Martin Atkins mart at
Wed May 25 05:25:52 PDT 2005

Christopher Schmidt wrote:
> On Wed, May 25, 2005 at 10:37:04AM +0100, Martin Atkins wrote:
>>Looks like somebody (is it *the* Ben Trott?) has written a FOAF library:
>>    <>
> Note the requirement for RDF::Core, which is basically a blocker for
> anything that is a limited shell account. Installing it is a pain: I'll
> admit I'm not perl expert, but it took me several hours of playing
> around on goathack to get it installed. The library itself is good
> (though hacky), but I would not want to push it off onto Consumers as a
> requirement.
> As much as I hate to admit it, parsing RDF with an RDF library in Perl
> for something that's meant to be used "Everywhere" does not have a good
> solution. 
> My Python script sent to the list a couple days ago does what a FOAF
> module would need to do (and is pretty easy to extend if need be) but
> I'm not sure how easy it is to install an XML DOM module on Perl. Can
> anyone give me a pointer to one so I can check it out? Does such a thing
> even exist?
> If someone can give me a pointer to a minidom module, I'll give hacking
> on this a start.

I think the only XML-related library you can rely on for "most 
installations" is XML::Parser, which is based on Expat. It doesn't have 
a DOM-like interface to it, but you can arrange for it to build a tree 
of objects which you can then use like one.

I suppose a full FOAF library isn't really necessary here, as we just 
need to provide a best-effort attempt to locate the "main" user's Person 
element. As long as it doesn't start accidentally returning stuff from 
other Person elements that are in the document and thus getting the 
wrong person's name it doesn't really matter if it misses some stuff. 
People who have awkward FOAF documents will soon come to realise that it 
isn't going to work for many consumers, especially ones which don't use 
the perl modules and try to do something hacky by hand -- and that is 
certain to happen.

More information about the yadis mailing list