GNOME Bugzilla – Bug 658869
Better ns for generated repositories.doap
Last modified: 2011-09-14 19:11:04 UTC
Created attachment 196323 [details] [review] Add proper namespaces for doap, foaf and gnome in dump_rdf Currently the xmlns of repositores.doap look different than than doap files for each project. For instance: <?xml version='1.0' encoding='UTF-8'?> <rdf:RDF xmlns:ns1="http://xmlns.com/foaf/0.1/" xmlns:ns2="http://api.gnome.org/doap-extensions#" xmlns:ns3="http://usefulinc.com/ns/doap#" xmlns:ns4="http://www.w3.org/2002/07/owl#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <ns3:Project> <ns3:shortname>nautilus-share</ns3:shortname> <ns3:created>2006-01-09</ns3:created> <ns3:name xml:lang="en">Nautilus Share</ns3:name> [...] It would be nice if repositories.doap also uses the namespaces proposed in DOAP as well as in https://live.gnome.org/MaintainersCorner The patch attached add the namespaces. I tested it individuals doap files and the file is generated as expected. It is very simple.
I forgot to add an example of the output with the patch: <?xml version='1.0' encoding='UTF-8'?> <rdf:RDF xmlns:doap="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:gnome="http://api.gnome.org/doap-extensions#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <doap:Project> <doap:name xml:lang="en">evolution</doap:name> <doap:shortdesc xml:lang="en">Manage your email, contacts and schedule</doap:shortdesc> [...] I tested it as: $ python >>> import semi_rdf >>> f = semi_rdf.read_rdf('file:///.../evolution/evolution.doap') >>> g = open('/tmp/test.doap', 'w') >>> semi_rdf.dump_rdf(f, g) >>> g.close() with and without the patch.