The value of sh:in is an rdf:List. Lists consist of intermediate notes that are 
linked into a chain using rdf:first and rdf:rest. The usual trick to walk such 
chains is to use a SPARQL path expression. The following may work for you:L

SELECT ?item
WHERE {
        <uri> sh:in ?list .
        ?list rdf:rest*/rdf:first ?item .
}

where rdf:rest* is walking through all list elements and rdf:first fetches the 
actual value of each element.

HTH
Holger


> On 29 Jun 2023, at 2:22 pm, Kasia Kryczka <[email protected]> wrote:
> 
> Hi everyone,
> I want insert a list of types to sh:in which would be :
> 
> <uri>
>   sh:in (
>       "aaa"
>       "bbb"
>       "ccc"
>     ) ;
> 
> my query doesn't work :
> INSERT{
> <URI> sh:in ?product
>   }
> 
> WHERE {
>   SELECT  ?product
> #  (GROUP_CONCAT(?product; SEPARATOR=', ') AS ?result) 
>   {
> 
>     BIND(teamwork:currentMasterGraph() as ?cGraph)
> 
> GRAPH ?cGraph 
>   {?cGraph owl:imports ?import}
> 
>   GRAPH ?import{
>         ?d a skos:Concept.
>         ?d skos:hasTopConcept ?Concept.
>           ?ProductT skos:broader ?Concept.
>         ?ProductT uri:product ?product .
>           }
>   FILTER(CONTAINS(STR(?Concept),"service"))
> 
> ##    BIND (ui:label(?product) AS ?label) .
>  
>   }GROUP BY ?product }
> 
> the result with concat_group is <uri>
>   sh:in (
>       "aaa,bbb, ccc"
>     ) ;
> 
> and this is not what I need. 
> 
> Could you give me a hint how to resolve this?
> 
> Thanks,
> 
> Kasia
> 
> 
> -- 
> The topics of this mailing list include TopBraid EDG and related technologies 
> such as SHACL.
> To post to this group, send email to [email protected]
> --- 
> You received this message because you are subscribed to the Google Groups 
> "TopBraid Suite Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/topbraid-users/ead4c18d-f520-47f3-8664-022c51c6c286n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/topbraid-users/ead4c18d-f520-47f3-8664-022c51c6c286n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
The topics of this mailing list include TopBraid EDG and related technologies 
such as SHACL.
To post to this group, send email to [email protected]
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/topbraid-users/FDF8A6FA-BDB4-499F-9951-BB1044E76E36%40topquadrant.com.

Reply via email to