preventing on parse wrong base uri
authorSergio Fernandez <sergio.fernandez@fundacionctic.org>
Thu, 20 Oct 2011 11:30:15 +0200
changeset 181 c784a76907c7
parent 180 2816bade4b4f
child 182 0aab4e545a04
preventing on parse wrong base uri
ontologies/specgen/libvocab.py
--- a/ontologies/specgen/libvocab.py	Thu Oct 20 11:28:10 2011 +0200
+++ b/ontologies/specgen/libvocab.py	Thu Oct 20 11:30:15 2011 +0200
@@ -253,11 +253,11 @@
 		self.filename = os.path.join(dir, f)
 		# print "ontology file name ", self.filename 
 		if (self.filename.endswith(".n3")):
-			self.graph.parse(self.filename, format="n3")
+			self.graph.parse(self.filename, publicID=uri, format="n3")
 		elif(self.filename.endswith(".rdf")):
-			self.graph.parse(self.filename, format="xml")
+			self.graph.parse(self.filename, publicID=uri, format="xml")
 		else:
-			self.graph.parse(self.filename)
+			self.graph.parse(self.filename, publicID=uri)
 		self.terms = []
 		self.uterms = []
 		# should also load translations here?