Dotnet RDF Query builder doesn't work when subquery have prefixes

33 views Asked by At

I'm using The query builder to create a sub query and when I add this subquery as a Child on my Main query it says that the query is not valid because I haven't defined the prefixes, and if I add the prefixes then the final query will contain duplicated prefixes, one at the root and another one inside the subquery which makes the query invalid, what is the workaround for that?

I've already tried with and without the prefixes on the subquery but I got errors either way, if I add prefixes on the subquery than the query is invalid because it looks like this:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT * WHERE 
{ 
  {
   PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
   PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>   
   SELECT ....
   }
   .......
 }

And If I dont add it I receive the following exception:

VDS.RDF.RdfException: The Namespace URI for the given Prefix 'rdf' is not known by the in-scope NamespaceMapper.  Did you forget to define a namespace for this prefix?
0

There are 0 answers