Parsing FOAF in perl?
wkearney99 at h...
Fri Dec 6 15:27:39 UTC 2002
> From: Ian Davis <iand at i...>
> No. Steer clear of anything that is not an RDF parser. You can get
> away with it for RSS (don't shout at me Bill!)
Not a chance, I'm completely in agreement with you Ian. Perhaps now that folks
have 'gotten their feet wet' with simple XML via RSS they'll start to see the
value of RDF. The way in which things can be 'layered' in RDF has a lot of
power. Implementing it in simple XML is possible but ends up reinventing RDF.
So yes, using an RDF parser is a very good idea.
I'd suggest, however, that given current market conditions it's not a good idea
to create XML that's valid only with an RDF parser. What RDF will allow vs what
simple XML handlers can understand are often different. My position is that
it's important to be compatible with existing parsing evironments but only up to
a point. Witness how things like MovableType will create simple RSS and RDF.
It'd be good to see tools follow this track.
> but FOAF, by intention,
> is going to contain extensive RDF constructs that you won't be able to
> handle with a straight XML parser.
Quite right. My own foaf would probably confuse most non-RDF aware parsers.
It's valid XML, of course, but depends on RDF of you ever hope to make sense of
what it's saying. The use of rdf:ID and rdf:resource attributes is a powerful
The one thing that troubles me is how various 'databasing' tools like foafnaut
are handling the 'authority' or 'provenance' of the statements being made. (this
is not a criticism of foafnaut) It's become obvious to me that it's possible to
"hijack" something indicated with a URI from within my foaf document. I could,
for example, state that personX's homePage URL is something. And unless their
own foaf indicated otherwise my assertion for it would stand. So just pulling
out raw triples is perhaps a bad thing. It's great for demos though! The
ability to clearly state authority over a triple is going to be important.
More information about the foaf-dev