Every user has a profile page and a list of friends. Following some of
the guides I've seen, I've added hCard information for the user's
profile, plus hCard+XFN for the friends list. Since it was so easy, I
went hog-wild and started adding hCards everywhere a user's avatar was
displayed. So, every comment, every recent-update, you-name-it.
(Note: It's not there as of 2008-04-18 because I haven't deployed the
code to the live server yet. Still some bugs...)
Now the problem I'm dealing with is that I have possibly dozens of
hCards on the profile page (user + friends + recent updates + comments).
If a spider finds the page and looks for hCards, there is no (easy) way
to tell that the profile belongs to user A and not A's friends. To
combat that, I've added a self-referential link with a rel="me" on it.
It looks like this:
<a href="http://www.obsidianportal.com/profile/micah" class="url uid"
rel="me"><span class="fn">Micah</span></a>
(Note: view e-mail source if the previous text doesn't display an entire
a-tag.)
Still, this uses XFN which is outside the realm of hCard and that seems
a little iffy to me.
Am I missing something? Has anyone else dealt with this problem? I
noticed that LiveJournal only has an hCard for the actual user on their
profile page, and uses XFN without hCard for the friends. Is this a
better idea?
Thanks!
Micah
_______________________________________________
microformats-discuss mailing list
microforma...@microformats.org
http://microformats.org/mailman/listinfo/microformats-discuss
--- there is a wiki page somewhere (which i can't find at the moment),
but there are a few options. HTML has the <address> element to
describe the contact info of the page owner. There are issues with
<address> due to it being an inline element, and not accepting
block-level inside it.
Also, the hResume microformat makes use of class="contact" to help
describe which hcard to use. I would recommend using one of those
options and seeing if that works in your markup.
If i or someone finds that wiki page, please add your thoughts and
experiences to it as well.
Thanks,
-brian
--
brian suda
http://suda.co.uk
> there is a wiki page somewhere (which i can't find at the moment),
> but there are a few options. HTML has the <address> element to
> describe the contact info of the page owner.
No - <address> provides contact information for the page. The owner
of the page and the correct person to contact regarding the page may
well differ. The page that you're thinking of is the representative-
hcard page, which addresses (no pun intended) this very issue amongst
others.
Also perhaps relevant is the page I threw together over the weekend
on mapping XFN to FOAF, which covers more than just FOAF really: it's
a general purpose guide on how to interpret the interactions between
different hCards and XFN on the same page. Not so much from an page
authoring perspective, but rather from a parser development point of
view, to make sure that people writing parsers don't misinterpret
pages like the ones described in this thread.
http://microformats.org/wiki/representative-hcard
http://microformats.org/wiki/xfn-to-foaf
--
Toby A Inkster
<mailto:ma...@tobyinkster.co.uk>
<http://tobyinkster.co.uk>
See http://microformats.org/wiki/representative-hcard
--
Tom Morris
http://tommorris.org/
Nicely timed Toby :)
I have a new test going on my Dev site that does just about what you
suggest and converts XFN+hCard via XSLT to produce a FoaF file called
for want of a word xFoaF. it Is very much inspired by Dan Connolly's
grokXFN.xsl
you can take a peek at http://dev.weborganics.co.uk/
example output using http://www.tantek.com/#hcard as the transformation
source:
Foaf explorer View
http://tinyurl.com/496dr5
RDF view
http://tinyurl.com/48w43d
Validated Triples
http://tinyurl.com/4s269f
The entire source code PHP and XSLT is also available for download on
the dev site.
to answer the question "multiple hCards on a user's profile page - how
can I mark one as the actual user?" I would mark up just one hcard
containing rel="me" which would represent the actual user and the rest
with rel="contact" or whatever XFN value is suitable.
Thanks
Martin McEvoy
> I have a new test going on my Dev site that does just about what you
> suggest and converts XFN+hCard via XSLT to produce a FoaF file called
> for want of a word xFoaF.
> example output using http://www.tantek.com/#hcard as the
> transformation
Mostly looks good, but I'd suggest that you seem to have some of the
relationships backwards. For example, Tantek has the following on his
page:
<a href='http://juliemelton.com' rel='muse'>Julie Melton</a>
which you convert to:
<Person rdf:ID="hcard">
<name>Tantek Çelik</name>
<rel:mentorOf>
<Person rdf:about="http://juliemelton.com">
<name>Julie Melton</name>
<weblog rdf:resource="http://juliemelton.com"/>
</Person>
</rel:mentorOf>
</Person>
(I've simplified both down a bit.)
I would suggest that the FOAF should be the other way around: Tantek
apprenticeTo Julie; not Tantek mentorOf Julie. (Yes, the terms
"mentor" and "apprentice" seem a bit odd, but they're about the
closest terms that the FOAF relationships extension has to "muse".)
Also, you needlessly output multiple foaf:knows for each person.
Thanks a lot for checking the output over for me, I have removed the
relationship vocab completely as it wasnt converting very well in favour
of using the XFN vocab itself.
>
> Also, you needlessly output multiple foaf:knows for each person.
>
Thanks didn't catch that Fixed now though I have also fixed parsing
multiple instances of the same person a much better output altogether.
Thanks again for your input.
Martin McEvoy