Re: [uf-discuss] Experimental implementation of hAtom on diveintomark.org
Mark Pilgrim wrote: http://beta.diveintomark.org/archives/2004/10/18/exit Based on Wordpress 2.0.2. No changes were required in the Wordpress code; it already marks up categories with rel=tag, and everything else could be done in my theme files. One question: does the vCard need to be inside the hentry? Because mine isn't, and it would be inconvenient (though not impossible) to move it. I see something on the wiki about a nearest in parent algorithm, but I missed the discussion about it and I'm not comprehending the sample code at the moment. It's looking good to me -- I'm just putting the finishing touches on a version of the AUMFP for hAtom 0.1. Here's what I'm seeing right now (hopefully this isn't too obtuse): {'@index': 'hentry-1', 'author': [{'@index': 'vcard-1', u'fn': u'Mark Pilgrim', 'n.family-name': u'Pilgrim', 'n.given-name': u'Mark', u'url': u'mailto:[EMAIL PROTECTED]'}], u'bookmark': u'http://beta.diveintomark.org/archives/2004/10/18/exit', u'entry-content': u'pIt\u2019s time for me to find a new hobby. Preferably one that\ndoesn\u2019t involve angle brackets. Or computers. Or\nelectricity./p', u'entry-title': u'Every exit', 'tag': [{'@index': 'tag-1', u'name': u'general', u'uri': u'http://beta.diveintomark.org/archives/rooms/general/'}]} The algorithm kinda sucks and is misnamed as Dimitri notes. Here's what I'm doing now. Basic loop -- look through parents: - look at the parent of the 'entry' for a proper hCard - if any hCards found, use all of them - if not found, repeat on the parent of the parent Definition of a proper hCard: - it must be an address - it must have class 'author' - it must not be in an entry This is a little more comprehensible. The next change I would suggest (for 0.2) is that the (hcard author) should be findable inside of an address element. Regards, etc... David ___ microformats-discuss mailing list microformats-discuss@microformats.org http://microformats.org/mailman/listinfo/microformats-discuss
Re: [uf-discuss] Experimental implementation of hAtom on diveintomark.org
On 3/15/06, David Janes -- BlogMatrix [EMAIL PROTECTED] wrote: {'@index': 'hentry-1', 'author': [{'@index': 'vcard-1', u'fn': u'Mark Pilgrim', 'n.family-name': u'Pilgrim', 'n.given-name': u'Mark', u'url': u'mailto:[EMAIL PROTECTED]'}], u'bookmark': u'http://beta.diveintomark.org/archives/2004/10/18/exit', u'entry-content': u'pIt\u2019s time for me to find a new hobby. Preferably one that\ndoesn\u2019t involve angle brackets. Or computers. Or\nelectricity./p', u'entry-title': u'Every exit', 'tag': [{'@index': 'tag-1', u'name': u'general', u'uri': u'http://beta.diveintomark.org/archives/rooms/general/'}]} That looks perfect. Now I just need to add the hAtom bits to my index template, and add hAtom support to feedparser, and then we can have the syndication wars all over again. -- Cheers, -Mark ___ microformats-discuss mailing list microformats-discuss@microformats.org http://microformats.org/mailman/listinfo/microformats-discuss
[uf-discuss] Experimental implementation of hAtom on diveintomark.org
http://beta.diveintomark.org/archives/2004/10/18/exit Based on Wordpress 2.0.2. No changes were required in the Wordpress code; it already marks up categories with rel=tag, and everything else could be done in my theme files. One question: does the vCard need to be inside the hentry? Because mine isn't, and it would be inconvenient (though not impossible) to move it. I see something on the wiki about a nearest in parent algorithm, but I missed the discussion about it and I'm not comprehending the sample code at the moment. -- Cheers, -Mark ___ microformats-discuss mailing list microformats-discuss@microformats.org http://microformats.org/mailman/listinfo/microformats-discuss
Re: [uf-discuss] Experimental implementation of hAtom on diveintomark.org
I think vCard has nearest-in-parent optimization. So, IMHO, no, it doesn't: http://microformats.org/wiki/hatom#Entry_Author Also, I think Nearest in Parent algorithm probably should be called First Ancestor With? :DG On 3/14/06, Mark Pilgrim [EMAIL PROTECTED] wrote: http://beta.diveintomark.org/archives/2004/10/18/exit Based on Wordpress 2.0.2. No changes were required in the Wordpress code; it already marks up categories with rel=tag, and everything else could be done in my theme files. One question: does the vCard need to be inside the hentry? Because mine isn't, and it would be inconvenient (though not impossible) to move it. I see something on the wiki about a nearest in parent algorithm, but I missed the discussion about it and I'm not comprehending the sample code at the moment. -- Cheers, -Mark ___ microformats-discuss mailing list microformats-discuss@microformats.org http://microformats.org/mailman/listinfo/microformats-discuss ___ microformats-discuss mailing list microformats-discuss@microformats.org http://microformats.org/mailman/listinfo/microformats-discuss