- From: Lin Clark <lin.w.clark@gmail.com>
- Date: Mon, 12 Oct 2009 07:45:01 -0400
- To: Stephane Corlosquet <scorlosquet@gmail.com>
- Cc: semantic-web@w3.org, sioc-dev@googlegroups.com, foaf-dev@lists.foaf-project.org, RDFa mailing list <public-rdf-in-xhtml-tf@w3.org>
- Message-ID: <d57ad86e0910120445w31eb1a9eu17416eaa2b974cbd@mail.gmail.com>
Hey Stephane, Regarding #1, I tried this: <a resource="path_to_node" property="foaf:name" typeof="sioc:User" class="username" title="View user profile." rel="sioc:creator_of foaf:made" about="user/1" href="/user/1">Henry</a> I used the inverse of created_by and maker so that there was only one subject, the user. It isn't as intuitive when you look at it, which is a shame, but the Check RDFa browser tool returns: http://localhost/lin-clark-drupal/user/1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> < http://rdfs.org/sioc/ns#siocUser> <http://xmlns.com/foaf/0.1/name> "Henry" <http://rdfs.org/sioc/ns#creator_of> < http://localhost/lin-clark-drupal/path_to_node> <http://xmlns.com/foaf/0.1/made> < http://localhost/lin-clark-drupal/path_to_node> Which I think includes all the same information, let me know if I missed anything. -Lin On Sun, Oct 11, 2009 at 11:09 AM, Stephane Corlosquet <scorlosquet@gmail.com > wrote: > Hi all, > > I'm checking the RDFa markup we have chosen for Drupal 7 and want to make > 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 comment. > "User profile" in this email refers to the concept of sioc:User / > foaf:OnlineAccount. Drupal has 3 main cases which all have different markup. > > > 1. If the administrator of the site decided to make the user profile pages > 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</a> > > We have 2 options to add RDFa to this link which both return the same RDF > data: > > <a href="/user/1" rel="sioc:has_creator foaf:maker" title="View user > profile." class="username"><span resource="/user/1" typeof="sioc:User" > property="foaf:name">Henry</span></a> > > or > > <span rel="sioc:has_creator foaf:maker"><a href="/d7sprint/user/1" > typeof="sioc:User" property="foaf:name" title="View user profile." > class="username">Henry</a></span></span> > > Question for the RDFa ninjas reading this: is there a way to embed all this > information without adding a span tag either inside or outside the a > existing a tag. I'm asking this because adding extra markup is frown upon by > Drupal themers as it might break some CSS rules or have unintended effects, > so if we can do without it it's best. To understand the risk of adding an > extra span, take a long at the second option above: 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 the > original non-RDFa markup. Unfortunately there is no "blank" tag which maybe > would have been helpful here by not interacting with CSS. Such "blank" HTML > tag would have been useful in this case to wrap RDFa markup and ensure it is > not targeted by any CSS rule (this could be a convention at least). > > > 2. If the user profile pages are not accessible then only the name of the > author will be displayed and we are missing the URL of her profile page, or > rather I should say we can generate a URI for the user profile, but > resolving it would lead to a 403 Access denied. The default Drupal markup in > this case is simply: > <span class="username">John</span> > > I see 3 alternatives to annotate this in RDFa: > > 2.1 Use a markup similar to the one above, but the cons is that the user > profile URI will not be dereferencable (and hereby breaking one of the > Linked Data principles). It will return a 403 Access denied. > > <span rel="sioc:has_creator foaf:maker" class="username"><span > resource="/user/1" typeof="sioc:User" > property="foaf:name">Henry</span></span> > > 2.2 Same as 2.1 but without the resource attribute hence generating a > bnode. I always try hard to avoid generating these, but if this is no work > around, then we'll have to use it. > > <span rel="sioc:has_creator foaf:maker" class="username"><span > resource="/user/1" typeof="sioc:User" > property="foaf:name">Henry</span></span> > > 2.3 We don't introduce the concept of user profile and simply link the > page to a name (literal). > > <span class="username" property="foaf:maker">Henry</span> > > I don't like 2.3 because it's not as meaningful from an RDF perspective. > Also, we don't have the same choices in the RDF properties we can use due to > the domain which is now a literal, which would be a problem in the context > of Drupal since the page -> author relationship gets the same set of RDF > properties no matter what the case is (between 1, 2 or 3). So I'd rather use > 2.1 or 2.2. but we've got to decide between the best of the two: a non > dereferencable URI or a bnode? I like the non referencable URI because we > can uniquely identify the author outside the scope of the page, but I wonder > how the parsers will react when trying to resolve the URI. > > > 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" class="username">Stephane > 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? > > Stephane. >
Received on Monday, 12 October 2009 11:45:43 UTC