[Microformats-dev] in progress draft of hcard-parsing

Bud Gibson bud at thecommunityengine.com
Mon Aug 8 08:10:09 PDT 2005


Tantek:

I did some work of my own on this topic over the weekend, saw your  
note and decided to save reading it till I was done.

Basically, I like your note.  It follows an "identify the microformat  
using the DOM and process from there"  strategy for which I proposed  
one greasemonkey implementation here:

http://thecommunityengine.com/home/archives/2005/07/greasemonkey_mi.html

As pointed out by Alf Eaton, Mark Rickerby, and others my original  
script had some limitations.  Today, I present to the list this new  
greasemonkey javascript that uses DOM scanning functionality  
available in both firefox and IE 6:

http://thecommunityengine.com/resources/xfolk-colorize3.user.js

This new script identifies xFolk entries and colorizes their  
component parts.  The script provides one encapsulated function,  
getLikeElements that combines DOM scanning with regular expression  
matching.  I'm going to assert that, with the right parameters, the  
getLikeElements function can  identify any microformat and its  
component parts in a web page.

Using your description of parsing in hCard, it should be trivial to  
write a script using the getLikeElements function to identify and  
process hCards satisfying all of your use cases.

My script is pretty well documented in the comments, and I also  
intend to write a post about it.  I thought I would throw it out  
today to provide some implementation meat to the covnersation.

Bud

On Aug 6, 2005, at 14:49, Tantek Çelik wrote:

> Greetings microformats developers,
>
> I have begun braindumping my original thoughts on compound  
> microformats
> parsing, using hCard as a specific example.
>
>  http://microformats.org/wiki/hcard-parsing
>
> I will add to it during the weekend (hopefully completing it), but  
> I wanted
> all of you to see it in progress in case it helps your work and
> understanding of microformats.
>
> Please note that this document is preliminary and incomplete, and  
> thus hold
> onto any perceived issues for now.
>
> Thanks,
>
> Tantek
>
> _______________________________________________
> Microformats-dev mailing list
> Microformats-dev at microformats.org
> http://microformats.org/mailman/listinfo/microformats-dev
>
>



More information about the microformats-dev mailing list