I've left out the support for anonymous users support in the initial patch which was committed to Drupal core as I wanted to think about it a little bit more. Time helps to come up with better ideas (I hope!), but we should not wait too much longer. I'm just about to propose a patch to add support for exporting RDFa for anonymous users but I'd like to make sure we get this right as this will be set in stone after Drupal 7 is released.
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:
We don't have a user profile URI here, but a homepage URL only. From the initial feedback I got earlier, it seems we could create a blank node of type foaf:Agent or sioc:User and use foaf:page to link it to the homepage. I suggest the following markup:
To keep things simple, I'm very tempted to reuse the sioc:User mapping we already have for the regular registered user. Is it ok not to use a foaf:Agent or foaf:Person in this case, and link a sioc:User to a homepage with foaf:page?
> On Fri, 2009-10-23 at 11:48 -0400, Stephane Corlosquet wrote: >> To keep things simple, I'm very tempted to reuse the sioc:User >> mapping >> we already have for the regular registered user. Is it ok not to >> use a >> foaf:Agent or foaf:Person in this case, and link a sioc:User to a >> homepage with foaf:page?
> sioc:has_creator links to a sioc:User by definition, not to a > foaf:Agent > or foaf:Person.
Indeed, if you want to use a sioc:User then it should go with sioc:has_creator but if you require a foaf:Agent, then use foaf:maker. However, both foaf:page / foaf:homepage have owl:Thing as a range so you can use it in combination with sioc:User. I'd yet avoid foaf:homepage as this is an IFP, and may lead to weird things (esp. for untrusted users)
> By the way, on http://drupalrdf.openspring.net/node/3 the > sioc:reply_of > links aren't getting picked up. They're "masked" by the > property="content:encoded" of the parent <div> element. A slightly > annoying feature of RDFa is that any property which results in an > rdf:XMLLiteral causes any RDF on descendant elements to be ignored.
> Possible solution...
> Drop this:
> <span rel="sioc:reply_of" resource="/node/3" />
> Change this (lines wrapped for readability):
> <h3 property="dc:title" datatype=""> > <a href="/comment/1#comment-1">a first comment to the blog post</a> > </h3>
> To this:
> <h3 property="dc:title" datatype=""> > <a about="/node/3" rel="sioc:has_reply" rev="sioc:reply_of" > href="/comment/1#comment-1"> > a first comment to the blog post > </a> > </h3>
> links aren't getting picked up. They're "masked" by the > property="content:encoded" of the parent <div> element. A slightly > annoying feature of RDFa is that any property which results in an > rdf:XMLLiteral causes any RDF on descendant elements to be ignored.
agreed. that's what I explained at [1] and that's due to Drupal internals. We're working on a solution which will in fact move the property attribute one level down on a new tag which will wrap the content. That way the property attribute will be on a tag at the same level (sibling) as <span rel="sioc:reply_of" resource="/node/3" />
that should in theory work and produce the intended RDFa...
> On Fri, 2009-10-23 at 11:48 -0400, Stephane Corlosquet wrote:
>>> To keep things simple, I'm very tempted to reuse the sioc:User mapping >>> we already have for the regular registered user. Is it ok not to use a >>> foaf:Agent or foaf:Person in this case, and link a sioc:User to a >>> homepage with foaf:page?
>> sioc:has_creator links to a sioc:User by definition, not to a foaf:Agent >> or foaf:Person.
> Indeed, if you want to use a sioc:User then it should go with > sioc:has_creator but if you require a foaf:Agent, then use foaf:maker. > However, both foaf:page / foaf:homepage have owl:Thing as a range so you > can use it in combination with sioc:User. > I'd yet avoid foaf:homepage as this is an IFP, and may lead to weird things > (esp. for untrusted users)
> Alex.
>> By the way, on http://drupalrdf.openspring.net/node/3 the sioc:reply_of >> links aren't getting picked up. They're "masked" by the >> property="content:encoded" of the parent <div> element. A slightly >> annoying feature of RDFa is that any property which results in an >> rdf:XMLLiteral causes any RDF on descendant elements to be ignored.
>> <h3 property="dc:title" datatype=""> >> <a href="/comment/1#comment-1">a first comment to the blog >> post</a> >> </h3>
>> To this:
>> <h3 property="dc:title" datatype=""> >> <a about="/node/3" rel="sioc:has_reply" rev="sioc:reply_of" >> href="/comment/1#comment-1"> >> a first comment to the blog post >> </a> >> </h3>
> -- > Dr. Alexandre Passant > Digital Enterprise Research Institute > National University of Ireland, Galway > :me owl:sameAs <http://apassant.net/alex> .
On Sun, Oct 25, 2009 at 9:22 PM, Uldis Bojars <capts...@gmail.com> wrote: > Hi Stephane,
> What you propose looks fine, especially considering there were no > strong objections on the mailing list.
> Having a FOAF Person / Agent (which would add complexity for you) for > anonymous persons can be somewhat more precise, but it boils down to > if you believe you can say that homepage is an IFP or not. If you > think homepage is an IFP for a person, then using FOAF has some more > knowledge than just a sioc:User.
> On the other hand using sioc:User can be just as good. After all, the > main thing is to put the data out there. Then people can make use of > it, elaborate the data, etc.
yes, here using sioc:User for any type of user keeps the implementation simple.
> BTW: How, based on this RDF data, can you know which user is anonymous > and which is a registered user?
Both are sioc:User, but registered users have a URI, while anonymous are blank nodes (and just have a foaf:page to their homepage). So SPARQL should be able to distinguish the two, I think. I just happened to talk to Andreas Langegger this morning over breakfast, he suggested to use the isBlank operator.
> On Fri, Oct 23, 2009 at 3:48 PM, Stephane Corlosquet > <scorlosq...@gmail.com> wrote: > > Hi,
> > I've left out the support for anonymous users support in the initial > patch > > which was committed to Drupal core as I wanted to think about it a little > > bit more. Time helps to come up with better ideas (I hope!), but we > should > > not wait too much longer. I'm just about to propose a patch to add > support > > for exporting RDFa for anonymous users but I'd like to make sure we get > this > > right as this will be set in stone after Drupal 7 is released.
> > 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:
> > We don't have a user profile URI here, but a homepage URL only. From the > > initial feedback I got earlier, it seems we could create a blank node of > > type foaf:Agent or sioc:User and use foaf:page to link it to the > homepage. I > > suggest the following markup:
> > To keep things simple, I'm very tempted to reuse the sioc:User mapping we > > already have for the regular registered user. Is it ok not to use a > > foaf:Agent or foaf:Person in this case, and link a sioc:User to a > homepage > > with foaf:page?