After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 658869 - Better ns for generated repositories.doap
Better ns for generated repositories.doap
Status: RESOLVED FIXED
Product: sysadmin
Classification: Infrastructure
Component: Git
unspecified
Other Linux
: Normal minor
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2011-09-13 01:48 UTC by Germán Poo-Caamaño
Modified: 2011-09-14 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add proper namespaces for doap, foaf and gnome in dump_rdf (1.13 KB, patch)
2011-09-13 01:48 UTC, Germán Poo-Caamaño
none Details | Review

Description Germán Poo-Caamaño 2011-09-13 01:48:08 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.
Comment 1 Germán Poo-Caamaño 2011-09-13 01:55:06 UTC
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.