web/views/sparql.py
changeset 4045 f4a52abb6f4f
parent 3998 94cc7cad3d2d
child 4159 6b2b20c73d59
--- a/web/views/sparql.py	Tue Dec 08 16:46:56 2009 +0100
+++ b/web/views/sparql.py	Tue Dec 08 16:50:36 2009 +0100
@@ -44,7 +44,7 @@
         vid = self._cw.form.get('resultvid', 'table')
         if sparql:
             try:
-                qinfo = Sparql2rqlTranslator(self._cw.schema).translate(sparql)
+                qinfo = Sparql2rqlTranslator(self._cw.vreg.schema).translate(sparql)
             except rql.TypeResolverException, ex:
                 self.w(self._cw._('can not resolve entity types:') + u' ' + unicode('ex'))
             except UnsupportedQuery:
@@ -102,7 +102,7 @@
 
     def cell_binding(self, row, col, varname):
         celltype = self.cw_rset.description[row][col]
-        if self._cw.schema.eschema(celltype).final:
+        if self._cw.vreg.schema.eschema(celltype).final:
             cellcontent = self.view('cell', self.cw_rset, row=row, col=col)
             return E.binding(E.literal(cellcontent,
                                        datatype=xmlschema(celltype)),