The purpose of this format is to define a standard way of marking up blogs with XOXO. This is a derivation of, and not an actual part of, the XOXO specification. This format is actually a hybrid format between XOXO and hAtom.
Terms
- A reccomended field is one that should be included in output meant to comply with this format
- An optional field is one that does not need to be included
- A-fields are fields stored within the markup of the primary <a> tag in an XOXO element
- Alternate-A fields are one stored with second, third, etc <a> tags
- DL-fields are ones stored within the optional <dl> list
Note that no fields will be marked as ‘required’. This is because, in full compliance with the XOXO specification, the only required field is ‘TEXT’ (the direct contents of the <li> or <a> tag).
Classes
This is a hybrid format between XOXO and hAtom and parsers are expected to be able to read either ‘half’ of the format. XOXO-only versions of this format should have the classes ‘xoxo’ and ‘posts’ on their root tag. hAtom-only (or hAtom with extensions) versions should use the hAtom ‘hfeed’ class. Data complying with both ‘halves’ of this format should have all three classes on the root. Neither hAtom nor XOXO actually requires any classes at all on the root, but if no data is found with any combination of the classes specified here parsers are to treat the entire document as hAtom. Then, if still no data is found, parsers should look for XOXO data that does not have the proper classes.
Meta Data
The first element will is considered by this format to be metadata for the entire section if rel=home. This part of the format is not found in hAtom and is only supported in XOXO-only or hybrid versions of this format. The following fields are defined for metadata:
- TEXT — blog title
- TITLE — blog description
- HREF — URL to blog main page
- CLASS — ID of blog
- Alternate-a rel=alternate
- TEXT — immaterial, just a label
- HREF — URL to blog feed
Subnodes
Subnodes, as defined by this format, encapsulate the comments on a post. Comment encapsulation is not supported by hAtom but is considered by this format to be an extension thereof. hAtom-only documents may be extended to encapsulate comments by outputting an XOXO section with the same fields specified for subnodes in this format in each hentry where there are comments. This XOXO element must have the classes ‘xoxo’ and ‘comments’.
The TEXT Field
- The TEXT field on elements stores the title of the post encapsulated by that section.
- The TEXT field on subnodes is immaterial.
A-Fields
On elements:
- HREF (reccomended) — this field stores the permalink URL to the post
- TITLE (optional) — this field stores the timestamp of the post (seconds or nanoseconds since the epoch)
- REL — should be set to ‘bookmark’, in keeping with hAtom
- CLASS — should be set to ‘entry-title’, in keeping with hAtom (Note: if there are no A-fields, TEXT must be encapsulated in a tag and given the class ‘entry-title’ to maintain hAtom compatability)
On subnodes:
- HREF (reccomended) — this field stores the permalink URL to the comment. If the field contents begin with ‘#’ the parser is expected to resolve it based on the post URL.
- TITLE (optional) — this field stores the timestamp of the comment (seconds or nanoseconds since the epoch)
Alternate-A Fields
On elements:
- When rel=comments (reccomended) this is not supported by hAtom is is considered by this format to be an extension thereof. To use this field in hAtom-only documents place a rel=comments link in the appropriate hentry elements.
- TEXT — number of comments on post (if non-numeric, assumed unknown)
- HREF — URL to comments on post
- When rel=author (optional, required by hAtom)
- TEXT — this field stores the name of the post author
- HREF — URL to post author’s profile or home page
To be compatible with hAtom, this link should be encapsulated in an ‘address’ tag with the classes ‘author’ and ‘vcard’. The link itself should have the classes ‘url’ and ‘fn’.
- When rel=archive (optional) the ‘updated’-classed field is required by hAtom
- TEXT — datetime-design-pattern datestamp for post
- CLASS — should be set to ‘published’ and ‘updated’ for compatability with hAtom
- HREF — URL to the archive the post is in
- When rel=’alternate comments’ (optional) this is not supported by hAtom is is considered by this format to be an extension thereof. To use this field in hAtom-only documents place a rel=’alternate comments’ link in the appropriate hentry elements.
- TEXT — immaterial, just a label
- HREF — URL to feed for comments on post
- When rel=external (optional) this is not supported by hAtom and is considered a mostly unnecessary piece of information. It is not supported as an extension and should only be used in XOXO-only or hybrid versions of this format.
- TEXT — immaterial, just a label
- HREF — URL to external link for post
On subnodes:
- The first alternate-a tag is assumed to be data for the comment author (reccomended)
- TEXT — author name / nickname
- HREF — author URL
DL-Fields
On elements and subnodes:
- body (reccomended, required by hAtom) — the post/comment body
To maintain hAtom compatability the post body dd tag should be given the class ‘entry-content’
Subnodes only:
- Author — Author name. Should only be set if the author has no URL and cannot be stored in the Alternate-A field. However, if there is an ‘a’ tag in the value of this field it should be parsed, the HREF used for author URL and the TEXT used for author name.
7 Responses
Johan Sundström •
The TEXT field on subnodes stores the date and time stamp, this can be in any human-readable format.
I’m not sure I’ve got this in context yet, but if you define a standard, always aim for ONE standardized and machine readable format. Human readable dates can always be sneaked in somehow as non-semantical data, without the need for any clauses about them in the standard itself.
Singpolyma •
You have a point there — I don’t really need to mention what goes in that field because it’s rather immaterial, since no parser will likely be able to make sense of it anyway (unless it be used for re-displaying the timestamp in it’s own format). I’m new at this whole sort of thing, and this particular format is just an extension of the embed-code for Blogger Recent Comments
Danny •
Looking good! Nice to see you’re sticking to hAtom/XOXO wherever possible.
One thing that seems to be slow in appearing, but is a *must* (IMHO) is a profile URI for each of the microformats. Dan Connolly was talking the other day of putting a separate profile together for the combination of hCard and hCalendar. I wonder if it might make sense to do one for hCard+XOXO..?
I’m really short of time at the moment, but would really like to get my own blog marked up this way, and at some point figure out the XSLT/GRDDL for translating this stuff to RDF. Meantime – keep up the good work!
Anonymous •
love the information found on your site, but for the love of god please get rid of that awful red as your background color! It is completely unreadable and terribly harsh on the eyes. I ended up using a firefox plugin to strip away your css styles just so i could continue to read it!
Singpolyma •
@anon – You know what? You people are disgusting. I have changed the theme on this site four times to suit complainers like you. Who cares if you MUST run an ext to read it? If you’re so picky then just run the ext! It works! I can read it, the last person who complained recommended this colour scheme. I’m moving the site soon anyway (I hope). I’m not a designer… the fact that it isn’t still a pukeish green should make people happy 😛
Chaoskaizer •
I’d seen hentry format at technocrati.
Interesting.
is there anywhere to test/parse this format.. any specific programs?
I agree with the Anonymous canadian poster above. get a nice theme;
go digg http://www.smashingmagazine.com/2007/02/09/83-beautiful-wordpress-themes-you-probably-havent-seen/
Stephen Paul Weber •
http://xoxotools.ning.com/hatom2rss.php is a primary tool supporting both formats 🙂