Microformats validator/transformator

Today I found an interesting service for Microformats validation/transforming that I found very useful. If you read my previous post about Newsdesk implementing Microformats for contact people you know that my favorite Microformats “tool/validator” so far is the Operator add-on for Firefox.

In a blog post from the Microformats team I read about an interesting service named Optimus that validates and transform your Microformats at a public URI and get the the data back as XML, JSON and JSON-P.

Choose an URI with a contact mark up at Newsdesk:
http://newsdesk.se/pressroom/newsdesk/contact_person/view/peter-ingman-administration-foeretagsledning-14

and just pass it as parameter to Optimus like this:

/?uri=http://newsdesk.se/pressroom/newsdesk/contact_person/view/peter-ingman-administration-foeretagsledning-14

As result you get a nicely formatted XML view with all Microformat information displayed.

<?xml version="1.0" encoding="UTF-8"?>
<microformats from="http://newsdesk.se/pressroom/newsdesk/contact_person/view/peter-ingman-administration-foeretagsledning-14" title="Newsdesk - Peter Ingman (Administration/företagsledning) - Newsdesk">
<description>Peter Ingman är en av grundarna och VD för Newsdesk.</description>
<hcard>
<email>pingman@newsdesk.se</email>
<fn>Peter Ingman</fn>
<org>Newsdesk</org>
<role>VD</role>
<tel>
<type>Work</type>
<value>08 644 89 51</value>
</tel>
</hcard>
<rel-nofollow>
<nofollow href="http://newsdesk.se/search/news">Sök i medier</nofollow>
<nofollow href="http://newsdesk.se/publish">Publicera</nofollow>
</rel-nofollow>
</microformats>

You can also easily get the response data as JSON and define an Callback function with just adding the parameters format=json and function=cbFunction.

/?uri=http://newsdesk.se/pressroom/newsdesk/contact_person/view/peter-ingman-administration-foeretagsledning-14&format=json&function=cbFunction

cbFunction({
"from": "http://newsdesk.se/pressroom/newsdesk/contact_person/view/peter-ingman-administration-foeretagsledning-14",
"title": "Newsdesk - Peter Ingman (Administration/företagsledning) - Newsdesk",
"hcard": {
"email": ["pingman@newsdesk.se"],
"fn": "Peter Ingman",
"org": ["Newsdesk"],
"role": "VD",
"tel": [{
"type": ["Work"],
"value": "08 644 89 51"
}]
},
"rel-nofollow": {
"nofollow": [{
"href": "http://newsdesk.se/search/news",
"value": "Sök i medier"
},
{
"href": "http://newsdesk.se/publish",
"value": "Publicera"
}]
}
});

Microformats Validation

The Optimus service also supports validation of Microformats. Pass your URI that includes Microformats mark-up and add the parameter format=validate and you will get a validator page with information about possible errors.

See Example here (/?format=validate&uri=http://newsdesk.se/pressroom/newsdesk/contact_person/list)

One Comment

  1. Posted October 23, 2009 at 11:58 am | Permalink

    Ever since my very first days of watchmaking school I have given the gear train a good spin during assembly before installing the escapement. ,

Post a Comment

Your email is never shared. Required fields are marked *

*
*