Dear community,

I want to ask if any can find the correct query in the below file[1] on how
to get the entire path (backward and forward) of Controls where a specific
value like "Client" is at least within one of the "Controls" recursion
dataset value. The "Controls" property is a recursive struct. i.e. a
"Controls" has another "Controls" and this another "Controls"... I want to
get the "$type", "Name" and  "Datasource"  of all the Controls where
"Client" is mentioned within any "Datasource" of any "Controls"


I have tried something like this, but is not working well for all cases:

BASE <https://schema.org/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT  ?d_source ?type ?name
WHERE {{
    ?s <Datasource> ?d_source;
       <$type> ?type;
       <Name> ?name;
  FILTER regex(?d_source , "Client")  }}

[1] https://github.com/iliriani/Test/blob/main/zapppdevfromsTTL.ttl

Reply via email to