[sysadmin-bin: 162/168] Add proper namespaces for doap, foaf and gnome in dump_rdf



commit 7f00265fe418877c97606d7587cd03ca2e4153d3
Author: GermÃn Poo-CaamaÃo <gpoo gnome org>
Date:   Mon Sep 12 18:45:28 2011 -0700

    Add proper namespaces for doap, foaf and gnome in dump_rdf
    
    Signed-off-by: GermÃn Poo-CaamaÃo <gpoo gnome org>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=658869

 semi_rdf.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/semi_rdf.py b/semi_rdf.py
index 72bb920..5fd0ee1 100755
--- a/semi_rdf.py
+++ b/semi_rdf.py
@@ -24,6 +24,9 @@ import sys
 import xml.sax
 from xml.sax.saxutils import escape, quoteattr
 
+DOAP = "http://usefulinc.com/ns/doap#";
+FOAF = "http://xmlns.com/foaf/0.1/";
+GNOME = "http://api.gnome.org/doap-extensions#";
 RDF = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
 XML = "http://www.w3.org/XML/1998/namespace";
 
@@ -222,6 +225,9 @@ def _dump_node(f, node, lang, namespaces, depth=0):
 
 def dump_rdf(nodes, f):
     namespaces = {
+        DOAP: 'doap',
+        FOAF: 'foaf',
+        GNOME: 'gnome',
         RDF: 'rdf',
         XML: 'xml'
     };



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]