In the following query 
 
PREFIX gnd:     <http://d-nb.info/standards/elementset/gnd#>
 
SELECT ?uri
WHERE {
  BIND (<http://d-nb.info/gnd/10244669> AS ?uri1)
  BIND (<http://d-nb.info/gnd/1024466-9> AS ?uri2)
  { {
      SELECT (?uri1 AS ?uri)
      WHERE {
        ?uri1 a gnd:CorporateBody .
      }
    } UNION {
      SELECT (?uri2 AS ?uri)
      WHERE {
        ?uri2 a gnd:CorporateBody .
      }
  } }
}

I'd expect that the ?uri1 and ?uri2 variables are bound in the
subqueries, and as a result to get zero, one or two values for ?uri.
However, I get every possible gnd:CorporateBody (more than a million).
 
It would be nice if somebody could point out why this happens, and how I
could work arround it. (Duplicating the BIND part and moving it into the
subquery works, but since it involves a query to a remote service and
some function calls, I'd prefer not to).
 
Cheers, Joachim
 

Reply via email to