A minor beautifying issue/proposal on the interfaces

So... I have now a version running on RDFLib. Well, there are probably bugs here and there, but many things are working. 

I hit a small, aesthetic issue. At the end of processing I get

@prefix ns1: <http://purl.org/dc/elements/1.1/> .
@prefix ns2: <http://xmlns.com/foaf/0.1/> .
<http://www.ivan-herman/foaf#me> ns1:date "2011-05-11";
    ns2:name "ivan"@hu .

This is functionally o.k., but the prefixes chosen are of course ugly. There is a possibility to control that in RDFLib (and maybe at other packages, too) if one can somehow provide information about the prefix mapping being used. However... in out case we have the serialize method running in a different place, with a single argument, namely the graph. The graph has no connection to the prefix mapping used by the program, so no bridging can be done.

Proposal: we could add an optional argument to serialize, which is a PrefixMap. The user can then forward the prefix mapping he/she used and, maybe, the parser can make use of it to improve the quality of the output...

Ivan

----
Ivan Herman, W3C Semantic Web Activity Lead
Home: http://www.w3.org/People/Ivan/
mobile: +31-641044153
PGP Key: http://www.ivan-herman.net/pgpkey.html
FOAF: http://www.ivan-herman.net/foaf.rdf

Received on Wednesday, 11 May 2011 14:03:53 UTC