login/register

Snip!t from collection of Alan Dix

see all channels for Alan Dix

Snip
summary

The microformats community has revisited it’s standard... “microformats version 2”. At first, I thought why! I...
The authoring patterns have been simplified even mor ...
microformats 2 addresses one of the biggest problems ...
Like mi

Brand new microformats 2 parser — Glenn Jones
http://glennjones.net/2013/01/brand-new-microformats-2-parser

Categories

/Channels/techie/markup and microformats

[ go to category ]

/Channels/techie/open data

[ go to category ]

For Snip

loading snip actions ...

For Page

loading url actions ...

The microformats community has revisited it’s standard and come up with “microformats version 2”. At first, I thought why! I don’t like change unless it gives me something worthwhile. After reviewing the work, I think the wholesale change to a new version of microformats is worthwhile because:

  1. The authoring patterns have been simplified even more and they are based on real life use cases e.g.: <a class="h-card" href="http://glennJones.net">Glenn Jones<a/> is a valid microformat

  2. microformats 2 addresses one of the biggest problems in maintaining microformats in real sites. The class names are now prefixed i.e. class=”fn” is now class=”p-name”. The prefixes like “h-*” and “p-*” tells you a class is a microformat property and helps make sure classes are not moved or deleted by mistake

  3. Like microdata, microformats 2 now has a full specification for a JSON API. This is important as it means the parsers should now have the same output and also browsers could implement this API.

HTML

<p>The microformats community has revisited it&#x2019;s standard and come up with &#x201c;<a href="http://microformats.org/wiki/microformats-2">microformats version 2</a>&#x201d;. At first, I thought why! I don&#x2019;t like change unless it gives me something worthwhile. After reviewing the work, I think the wholesale change to a new version of microformats is worthwhile because:</p> <ol> <li>The authoring patterns have been simplified even more and they are based on real life use cases e.g.: <code>&lt;a class="h-card" href="http://glennJones.net"&gt;Glenn Jones&lt;a/&gt;</code> is a valid microformat</li> <p><br></p> <li>microformats 2 addresses one of the biggest problems in maintaining microformats in real sites. The class names are now prefixed i.e. class=&#x201d;fn&#x201d; is now class=&#x201d;p-name&#x201d;. The prefixes like &#x201c;h-*&#x201d; and &#x201c;p-*&#x201d; tells you a class is a microformat property and helps make sure classes are not moved or deleted by mistake</li> <p><br></p> <li>Like microdata, microformats 2 now has a full specification for a JSON API. This is important as it means the parsers should now have the same output and also browsers could implement this API.</li> </ol> <h2></h2>