Tag Archives: microformats

Google Maps’ microformats: unhappy anniversary – still broken after three years

Three years ago today — on 31 July 2007 — Google proudly announced that they had added hCard microformats to Google Maps, so that, as they put it:

your browser can easily recognize the address and contact information in the page, and help you transfer it to an addressbook or phone more easily

Less than four hours after seeing a mailing-list repost of that announcement, by Google‘s Kevin Marks (one of the two signatories of the initial announcement), I replied, pointing out that the implementation was badly broken, and that none of the microformats in a search for a single entity, in this case a school, were valid. (As is usual on Google’s own blogs, there was no facility for comments on the original announcements.)

Google‘s Gregor J. Rothfuss, the announcement’s other signatory, replied that he would look into the matter.

Almost a month later, I asked Gregor if there had been any progress, and he said (I quote him in full):

i will work on it when i have some time.

so I took him at his terse word, and left him to it, with no further reminders. That’s the last I heard from anyone at Google on the issue.

Three years on, though the specific faults have changed, not one of the microformats in the Google Maps search linked above is valid (the mandatory “fn”, or “formatted name” property is missing; address components lack the mandatory child-properties) and I have been unable to find one that is, in other results. They are as useless to someone wanting to add the subject’s address to their address book today as they were on day one.

Update, 31 July 2011: Another year has passed, the microformats are still broken.

Overdue measurement microformat: useful for radio station frequencies

Three or four years ago, I and a few others did a lot of work preparing a draft for a , hMeasure, for marking up length, mass (weight), temperature and so on. Sadly, it has yet to be taken up by the unelected and unaccountable clique who oversee the microformats “process” — but that’s a story for another time.

Recently Corey Mwamba asked how he could semantically mark up the frequencies of radio stations, for example:

Heart FM (Sussex) 102.4 MHz (Eastbourne)

My friend Toby Inkster rightly proposed the use of the “note” property, but I think that authors could also usefully use a non-microformat class name of “frequency”, for added semantic richness (and to aid screen-scrapers), and better still, the proposed hMeasure:

         <div class="vcard">
                 <b class="fn org">Heart FM
                    (<span class="adr">
                        <span class="locality">Sussex</span>
                     </span>)
                 </b>
                 <i class="note frequency">
                         <span class="hmeasure">
                          <span class="num">102.4</span>
                          <span class="unit">MHz</span>
                        </span>
                         (<abbr title="50.9761;0.2293" class="geo">
                              Eastbourne
                          </abbr>)
                 </i>
         </div>

If enough people use this pattern (and write up their experiences of doing so), then a de facto microformat will emerge.

Update: There’s a copy of that code at pastebin.com/CXCYT5nF which has syntax highlighting, and which you can replicate and edit if you wish to make a counter suggestion.

Update 2: I have now implemented this in the Wikipedia Frequency template, as seen, for example, on the article about BRMB.

Lists in Microformats: Suggested Optimisation

Based on my extensive experience of applying microformats to templates in Wikipedia (and other MediaWiki installations) I’ve come to the following conclusion…

For attributes which can occur more than once (such as nickname or category in hCard), lists having, or in container having, that property should be parsed as lists of individual instances of that property.

For example:

<div class="category">
<ul>
<li>ornithologist</li>
<li>driver</li>
<li>gardener</li>
</ul>
</div>

and:

<ul class="category">
<li>ornithologist</li>
<li>driver</li>
<li>gardener</li>
</ul>

should be treated as equivalent to:

<ul>
<li class="category">ornithologist</li>
<li class="category">driver</li>
<li class="category">gardener</li>
</ul>

Manu Sporny recommends me on LinkedIn

I hope you will forgive me for immodesty repeating Manu Sporny’s kind and fulsome recommendation of me, from my LinkedIn profile, for the benefit of those of you who don’t have accounts there:

I had worked with Andy in the Microformats community, developing international standards for the Web. During this time Andy not only excelled at providing technical feedback and review, but led several bold initiatives to standardize the classification of planetary-geo-location and living species on the web. While a logically consistent and wise technical contributor, his influence on the direction of the community was also vital. Andy’s role in questioning and influencing the core philosophy and community process was and continues to be deeply appreciated.

I’m genuinely touched by that. Thank you, Manu!

Manu Sporny is CEO of Digital Bazaar.

Twitter: A microformat in lieu of a protocol

In May of this year I wrote about the problems of URLs for a given Twitter user’s profile, or for an individual post or “status” being different, depending the Twitter client in use. I suggested a new protocol for Twitter links. [You might want to read that, before the rest of this post]. I can’t believe I didn’t think of this simpler solution sooner!

The answer (in the short term) is to use a microformat (or a microformat-like “poshsformat”, if you prefer to call it that) for each case. Let’s say we use the classes twitter-user & twitter-status.

User-agents (that’s jargon for browsers) could then employ a script (such as those used by GreaseMonkey, or a Firefox extension) to ignore the encoded URL and substitute the equivalent for the user’s preferred Twitter client instead.

For links to user profiles:

<a
href="http://twitter.com/pigsonthewing">
Andy Mabbett
</a>

would become:

<a
class="twitter-user"
href= "http://twitter.com/pigsonthewing">
Andy Mabbett
</a>

and:

<a
href="http://accessibletwitter.com/app/user.php?uid=pigsonthewing">
Andy Mabbett</a>

would become:

<a
class="twitter-user"
href=" http://accessibletwitter.com/app/user.php?uid=pigsonthewing">
Andy Mabbett</a>

Likewise, for individual statuses:

<a
href="twitter.com/pigsonthewing/status/1828036334">
something witty</a>

would become:

<a
class="twitter-status"
href="twitter.com/pigsonthewing/status/1828036334">
something wittyg<a>

and:

<a
href="accessibletwitter.com/app/status.php?1828036334">
something witty<a>

would become:

<a
class="twitter-status"
href="accessibletwitter.com/app/status.php?1828036334">
something witty<a>

and:

<a
href="m.slandr.net/single.php?id=1828036334"
something witty</a>

would become:

<a
class="twitter-status"
href="m.slandr.net/single.php?id=1828036334">
something witty</a>

To simplify matters, the rules for extracting the user ID or the status update could be the same in both cases:

  1. Parse the value of the href attribute of the element to which the class applies.
  2. If there is a question mark, use everything after that.
  3. Otherwise, if there is an equals sign, use everything after that.
  4. Otherwise, use everything after the last slash.

That would deal with all the examples in my earlier post.

So, if you’re using a user-agent which is aware of this microformat, and find on a page:

<a
class="twitter-user"
href="http://twitter.com/pigsonthewing">
Andy Mabbett<a>
said
<a
class="twitter-status"
href="m.slandr.net/single.php?id=1828036334">
something witty<a>

but your preferred Twitter client is Dabr (one I recommend, BTW!) then your browser would treat (and possibly render) that as:

<a
href="dabr.co.uk/user/pigsonthewing">
Andy Mabbett<a>
said
<a
class="twitter-status"
href="dabr.co.uk/status/1828036334">
something witty<a>

Simples!

Machine Tagging Flickr

I’ve posted some more thoughts on machine- (or triple-) tags and microformats on Flickr, in their Flickr Ideas group.

Update: There is now a tool to automatically generate tags for Flickr images of living things; iNaturalist tagger.

How microformat developments are blocked

The hCard microformat can distinguish between a person and an organisation, by the use of the org property:


<div class="vcard">
<span class="fn">Andy Mabbett</span>
</div>


<div class="vcard">
<span class="fn org">The Red Cross</span>
</div>

but it cannot distinguish between an organisation and a place:


<div class="vcard">
<span class="fn org">The Wembley Stadium fan club</span>
</div>


<div class="vcard">
<span class="fn org">Wembley Stadium</span>
</div>

treating them both as organisations.

On 31 December 2007, I described a way in which hCard microformat could be used to differentiate between hCards for places and organisations.

On 9 January 2008, having received favourable comment, I made a formal proposal to update the hCard specification.

Despite this ten-day gap, Brian Suda, one of the microformats “admins”, the cabal who control microformats, complained that he’d only had two days to consider the matter, and that “More time is needed to fully look over the implications of this change.”

No objections to the method, nor issues with it, have been raised.

Toby Inkster’s superb microformats parser Swignition (formerly called “Cognition”) has supported the method since version 0.1-alpha8, released in May 2008.

One year on from my formal proposal, what changes have been made to the hCard specification, in this regard? None.

Update: Three years on from my formal proposal, what changes have been made to the hCard specification, in this regard? None.

hAccessibility: BBC drop hCalendar microformat

Almost two years after I first raised the issue (to a reaction from the cabal that runs the microformats “community” which began with denial and moved to hostility) the BBC have stopped using the hCalendar microformat due to accessibility concerns.

Maybe now something can be done to incorporate one of the several, more accessible proposed work-arounds, into the relevant standards?

Thanks to Bruce Lawson and Patrick Lauke for breaking the news.

Update: Patrick now has a post on the subject, at webstandards.org

Spotted Mimics

As a child, I was often taken to our local shopping centre in Perry Barr, north Birmingham (since replaced by a tin shed with pretensions of being a mall) to see a Mynah bird (Acridotheres tristis). It resided in what I now realise was a ridiculously small cage, on the counter of a petshop, and would delight all and sundry by asking repeatedly, “Where’s George?”, wolf whistling, or performing another of its many acts of mimicry.

Now my ears are more attuned to such things I realise that the journey was unnecessary. Still living in Birmingham, I can hear the avian equivalent of Rory Bremner any time I wish, simply by opening a window and listening to the Mynah’s relatives, my local Starlings (Sturnus vulgaris). With the onset of autumn, they flock in ever increasing numbers, resplendent in new, strikingly sleek and spotty plumage, and very vocal. As well as having an uncanny ability to sound like any number of other birds, they have been known to imitate car alarms and mobile phones, and even children’s playground screaming.

The quiet suburban road where I live is rarely without Starlings, at any time of day, but the city-centre skies are no longer darkened by the flocks which came in to roost there in my childhood. A backfiring car would see thousands take off at once, and have pedestrians reaching for tissues to remove their supposedly “lucky” deposits from clothing or — worse — hair.

The birds in my garden are far better behaved, except when treated to their favourite delicacy: leftover, raw, shortcrust pastry. They descend from my and my neighbours’ rooftops the second I step back from the bird table, and the food disappears in moments, in a cloud of flying feathers and squawking and pecking bills, the birds mingling too rapidly to count accurately.

One particularly convincing, if annoying, individual has perfected the art of reproducing a Buzzard‘s (Buteo buteo) mewing call, no doubt heard in more open country. Ever gullible, I rush into the garden each time it performs this trick, in the hope of adding the real thing to my “garden list”. So far, without success.

[The above was written some time ago, with the intention of emulating the Guardian’s Country Diary column. As such, it has exactly 200 words, not counting the subsequent addition of scientific names. These are marked up with the draft Species Microformat, which I developed, and which is already being used on Wikipedia.]