The patch can be found at http://crschmidt.net/lj/foaf.patch.txt
LJ::load_user_props($u, qw{
- aolim icq yahoo jabber msn url urlname external_foaf_url
+ aolim icq yahoo jabber msn url urlname external_foaf_url state city country journaltitle
});
Here, you can see that I am adding three user props for loading: state, city, country, and journaltitle. These will all be used, if available, later in the FOAF file.
- $ret .= " xml:lang=\"en\"\n";
Pulling out the xml:lang="en", becuase it really isn't serving the purpose it should. Although there is *some* text in the document which is in the English language, much of it is going to be nicknames or other fields which are not language specific, and tagging these as English turned out to be a bad idea. In addition, sha1sums were also being tagged as english, which means that in some cases, they aren't seen as "equal" due to language differences.
The next chunk looks a bit funky, but I'm not about to hack diff to make it look better, so I'll just explain: The birthdate and Group/Person code is moving down a bit. The first part of the file will now be a "PersonalProfileDocument". This allows spiders of the document to know who the main "person" the file is about is, without needing LiveJournal specific knowledge. To that end, I've also added an rdf:nodeID='a', to link from the profile document to the <foaf:Person> who is the maker/center of the document. The reason that the nickname and birthdate are moving down is that they were earlier displayed, even if the user had an external FOAF URL, which is not acceptable: with an external FOAF URL, as much data as possible should be left out.
The next chunk:
- # include a user's journal page and web site info
- $ret .= " <foaf:weblog rdf:resource=\"" . LJ::journal_base($u) . "/\"/>\n";
+ # include a user's journal page, name/nick and web site info
+ $ret .= " <foaf:name>LJ::exml($u->{name})</foaf:na
+ $ret .= " <foaf:nick>$u->{user}</foaf:nick>\n";
+ $ret .= " <foaf:logo rdf:resource='$LJ::USERPIC_ROOT/$u->{def
+ $ret .= " <foaf:weblog rdf:resource='" . LJ::journal_base($u) . "/'";
+ $ret .= " dc:title=\"" . LJ::exml($u->{journaltitle}) . "\"" if $u->{journaltitle};
+ $ret .= "/>\n";
is probably the most controversial change of the bunch. There are three things happening here:
- foaf:name is added, set to the "Name" field stored for the user
- default userpic is added, as a foaf:logo. This was a *lot* of discussion in the foaf community, and it was decided that this was the closest thing that there was to a foaf-specific tag.
- journaltitle, if it is available, is added to the weblog node.
The next two chunks are well laid out and self explanatory: one is a a reformatting of the foaf:dateOfBirth (Which has been redefined to not be what LiveJournal uses) into a bio:birth Event with a date. Secondly, the location information is included as a vcard:ADR, the most accurate way of describing said information at the moment.
If anyone has any thoughts on things I've missed, or would like me to explain my reasoning more for a specific choice, please feel free to ask, and I will do my best to answer.
http://crschmidt.net/lj/foaf.patched.xm
Edited: Mutiny, on #foaf on irc.freenode.net, mentions that I wasn't properly escaping the $u->{name} field. This isn't needed for $u->{nick}, since it can't have any goofy characters, but name certainly can.
February 18 2005, 02:30:59 UTC 7 years ago
February 18 2005, 02:45:16 UTC 7 years ago
February 18 2005, 03:47:36 UTC 7 years ago
poll
Would doing an online poll in this community (almost a petition) to have these changes committed do any good? Make it a meme and unleash it on Live Journal, we'll have 36,000 "signitures" by tuesday. :)There really needs to be a
foaf:avitaror something similar.February 18 2005, 12:40:55 UTC 7 years ago
Re: poll
I'm still considering just using an LJ namespace for some stuff, like the "avatar" part. But I do like the idea of trying to get this stuff into play in the FOAF namespace. Since foaf:logo isn't really used by anyone, LJ can basically define that.I doubt we'd get 36,000 signatures. No matter how much you memed it, I doubt you'd get more than 3 dozen or so, since that's the sum total of people who have demonstrated an interest in FOAF on LiveJournal in the past.
March 15 2005, 08:09:32 UTC 7 years ago
Re: poll
I'm digging up numbers now to demonstrate that this info is being used. There's a handful of developers, true, but our apps generate a few thousand hits. I'm not foolish enough to think it's a significant number to LJ, but it's the best argument I can think of right now.February 18 2005, 07:14:15 UTC 7 years ago
Question
Why not include the subtitle as well?February 18 2005, 12:38:27 UTC 7 years ago
Re: Question
What property would that be? I'm doing my best not to add any more namespaces here, because for every line of code added to a patch, it's an extra week of waiting, in my experience. That would be two lines.March 15 2005, 09:48:42 UTC 7 years ago
Wasn't it decided before that the LiveJournal user “name” was unsuitable for use as a
foaf:namebecause most users just put rubbish in this field? What's changed?