[foaf-dev] Drupal user profiles in RDFa
contact at nickshanks.com
Mon Oct 12 12:06:58 CEST 2009
On 11 Oct 2009, at 16:09, Stephane Corlosquet wrote:
> Hi all,
> I'm checking the RDFa markup we have chosen for Drupal 7 and want to
> sure it's optimal, given that it won't be able to change it after
> the code
> freeze (which in one week!). In particular I'd like to discuss the
> case of
> the user markup which is used to describe the author or a page or
> "User profile" in this email refers to the concept of sioc:User /
> foaf:OnlineAccount. Drupal has 3 main cases which all have different
I am not keen on redundancy. I would rather let the Web of Data handle
things like saying "a user is someone with an online account".
Also, I believe OnlineAccount is going to be renamed to Account soon
(with the old term relegated to an appendix and made same as or
subclass of the new one).
> 1. If the administrator of the site decided to make the user profile
> public, then the author will be a link to the author profile page
> http://example.org/user/23. The original markup is:
> <a href="/user/23" title="View user profile." class="username">John</
> We have 2 options to add RDFa to this link which both return the
> same RDF
> <a href="/user/1" rel="sioc:has_creator foaf:maker" title="View user
> profile." class="username"><span resource="/user/1" typeof="sioc:User"
> <span rel="sioc:has_creator foaf:maker"><a href="/d7sprint/user/1"
> typeof="sioc:User" property="foaf:name" title="View user profile."
again sioc and foaf ways of saying the same thing aren't really
necessary. IMHO you should choose one primary vocabulary that best
meets as many of the triples you want to describe as possible, and
stick to that one wherever you have a choice. (i.e. become "a SIOC
document" or "a FOAF document")
> if there is a CSS rule
> on "a span" path targetting other markup on the site, then name of the
> author will suddenly be affected by this rule, while it would not in
> original non-RDFa markup. Unfortunately there is no "blank" tag
Actually span and div *are* the blank tags of HTML. They should not
really be used in CSS selectors.
I would contend that a selector of the form "a span" is already broken
if it was intending to style something more specific than a bunch of
semi-random inline content.
A more appropriate user selector might be "article a > .hostname" or
whatever the use case was.
As such, I would not worry about it, and perhaps write an op-ed
article about how not to abuse CSS when creating themes!
> 3. In the case of a non registered user leaving a comment, Drupal
> offers to
> leave her name, homepage and email address (though the email address
> is not
> displayed for privacy reasons). The default markup is:
> <a href="http://openspring.net/" rel="nofollow"
> Corlosquet (not verified)</a>
> We don't have a user profile URI here, but a homepage which is usually
> linked to a foaf:Person. Here we have multiple options again to
> describe the
> author of a comment. I'm not sure we should directly link a page to a
> foaf:Person, should we?. Do we have to generate a foaf:OnlineAccount
> /sioc:User URI here based on the homepage by adding #user to it? use a
> bnode? opinions?
I suggest foaf:Agent + rdfs:seeAlso
the user could be representing their company, and put their company
URL, for example:
<a href="http://acmesprings.example/" rel="nofollow"
class="username">Acme Springs, Limited</a>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2456 bytes
Desc: not available
Url : http://lists.foaf-project.org/pipermail/foaf-dev/attachments/20091012/814d40a9/attachment.bin
More information about the foaf-dev