[uf-discuss] Cognition 0.1 alpha11 released!
Toby A Inkster
mail at tobyinkster.co.uk
Thu Jul 24 12:15:20 PDT 2008
Summary: added support for hAudio, hResume, species, hmeasure and
XEN; improved parsing, especially datetime; more experimental
features for hCard.
URL: http://buzzword.org.uk/cognition/
Details:
Previous releases have included a lot of repetitive code for
microformat parsing. This release includes a new centralised function
which takes care of 95% of microformat parsing. It means that I can
make improvements to one single function which will then benefit
parsing for all microformats.
Two improvements I've already made are:
* Improved datetime parsing, including support for HTML 5's <time>
element; and
* Better handling for nested microformats. For example, whereas
previously Cognition would only parse an agent hCard if the class
names "agent" and "vcard" were found on the same element, it is now
able to cope with the "vcard" element being nested *inside* the
"agent" element.
I've implemented support for the current hAudio draft <http://
microformats.org/wiki/haudio>. This information may be output as RDF,
and in future versions I expect to be able to output it as a podcast
in RSS or Atom.
I've also implemented support for the most recent draft of hResume
<http://microformats.org/wiki/hresume>. Output is in RDF, using the
DOAC (Description of a Career) vocab.
I've implemented support for the current species draft <http://
microformats.org/wiki/species-strawman-01>, in a manner broadly
compatible with the existing user script for Operator. This
information may be output as RDF, and (using extensions) hCard and
iCalendar. Details of the support have been documented <http://
buzzword.org.uk/cognition/uf-plus.html#species>.
Implemented support for the latest hmeasure <http://microformats.org/
wiki/measure> draft, treating units as opaque strings.
Although it was intended as a joke, I've implemented XEN, the XHTML
Enemies Protocol <http://xen.adactio.com/>. To use it, you MUST
include the profile URI.
Lastly, I've continued extending Cognition's support for hCard to
include support for new vCard 4.0 (draft) properties. In this
revision, this has included changing "lang" from a singular property
to a plural property, and adding support for the "member" property,
which may take a URL or an embedded hCard. e.g.
<div class="vcard">
<p>Members of the <a href="http://microformats.org"
class="fn org url">Microformats Community</a> include:</p>
<ul>
<li class="member vcard">
<a class="url fn" href="http://tantek.com">Tantek Celik</a>
</li>
<li class="member vcard">
<a class="url fn" href="http://suda.co.uk">Brian Suda</a>
</li>
<li>
<a class="member" href="http://adactio.com/">Jeremy Keith</a>
</li>
<li>
<a class="member" href="mailto:tai at g5n.co.uk">Toby Inkster</a>
</li>
</ul>
</div>
This syntax is achieved by extrapolating the existing hCard standard
from vCard 3.0 to vCard 4.0 draft.
Feedback is welcomed.
--
Toby A Inkster
<mailto:mail at tobyinkster.co.uk>
<http://tobyinkster.co.uk>
More information about the microformats-discuss
mailing list