List Info

Thread: Coding mbox_sha1sum in XFN




Coding mbox_sha1sum in XFN
country flaguser name
United Kingdom
2008-04-27 04:43:20
Julian Bond wrote:

> This looks like a generic problem. How to qualify an
XFN entry with
> additional non-visible information.


Ah. Additional. In my earlier message I was assuming that
you did not  
know (or want to show) an HTTP URL for the contact. That is,
that you  
wanted to represent a person by their mbox_sha1sum *instead*
of a  
conventional URL.

> <span
class="mbox_sha1sum:fc521285feac8d1de0a488166aeeb9dbf99
070e1">
> <a href="url"
rel="contact">their name</a>
> <span>

That approach won't be picked up by any parsers that I know
of. A  
better approach would be to look into RDFa or eRDF. Very few
parsers  
though will handle both microformats and one of those.
Cognition  
<http://buzzword
.org.uk/cognition/> handles most microformats, plus 

eRDF *and* RDFa. Here's a code sample that uses hCard, XFN
and RDFa  
(FOAF) and is correctly parsed by Cognition:

	<div class="vcard" id="alice"
	xmlns:foaf="http://xmlns.com
/foaf/0.1/">
		<a class="fn url" rel="contact"
		about="#alice"
		property="foaf:mbox_sha1sum"
		content="fc521285feac8d1de0a488166aeeb9dbf99070e1&quo
t;
		href="http://alice.example.n
et"
		>Alice Jones</a>
	</div>

Note that RDFa introduces a handful of extra attributes to
HTML, so  
will not validate unless you use an RDFa DOCTYPE. (eRDF uses
existing  
HTML attributes, but in my experience is often very likely
to result  
in false positives for parsers when applying eRDF parsing to
pages  
that were not authored from the ground up with eRDF in
mind.)

-- 
Toby A Inkster
<mailto:mailtobyinkster.co.uk>
<http://tobyinkster.co.uk
>



_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

Re: Coding mbox_sha1sum in XFN
country flaguser name
United Kingdom
2008-04-27 11:33:32
Toby A Inkster <mailtobyinkster.co.uk> Sun, 27 Apr 2008
10:43:20
>Julian Bond wrote:
>
>> This looks like a generic problem. How to qualify
an XFN entry with
>> additional non-visible information.
>
>Ah. Additional. In my earlier message I was assuming
that you did not 
>know (or want to show) an HTTP URL for the contact. That
is, that you 
>wanted to represent a person by their mbox_sha1sum
*instead* of a 
>conventional URL.
>
>> <span
class="mbox_sha1sum:fc521285feac8d1de0a488166aeeb9dbf99
070e1">
>> <a href="url"
rel="contact">their name</a>
>> <span>
>
>That approach won't be picked up by any parsers that I
know of. A 
>better approach would be to look into RDFa or eRDF. Very
few parsers 
>though will handle both microformats and one of those.

At this point, I think you might as well publish the content
in a 
structured format like FOAF or one of the many Contacts
APIs. Trying to 
overload HTML seems like a poor alternative to FOAF with
Auto-Discovery.

-- 
Julian Bond  E&MSN: julian_bond at voidstar.com  M: +44
(0)77 5907 2173
Webmaster:          http://www.ecademy.com/  
   T: +44 (0)192 0412 433
Personal WebLog:    http://www.voidstar.com/
    skype:julian.bond?chat
                           Assorted Flavours
_______________________________________________
microformats-discuss mailing list
microformats-discussmicroformats.org
http://microformats.org/mailman/listinfo/microforma
ts-discuss

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )