title: Verify rdf:Container(rdf:Seq) using shacl constraints
body: <p>I am currently trying to build a constraint validation shape for an incoming object of the type <code>rdf:Seq</code>. The <code>shacl</code> shapes I have used, use the path to identify triple and then add additional constraint validations on datatype, length and count. But, with the case of <code>rdf:Seq</code> the predicate is a variable, it can be rdf:_1, rdf:_2,.... . How can I build an effective shape where I would not know how many elements would be present in the incoming <code>rdf:Seq</code> object?</p>
  <p>Or is there a way I can check that if the predicate is of the type <code>rdfs:ContainerMembershipProperty</code> I can validate the <code>datatype</code> of the data, otherwise ignore it?</p>
  <p>Appreciate any help. Thanks!</p>
  <p>Let's say for a given incoming data</p>
  <pre><code>...
  &lt;incoming node&gt; schema:colors _:blankNode1 .
  _:blankNode1 rdf:type rdf:Seq .
  _:blankNode1 rdf:_1 &quot;Red&quot; .
  _:blankNode1 rdf:_2 &quot;Blue&quot; .
  _:blankNode1 rdf:_3 &quot;Yello&quot; .
  ...
  </code></pre>
  <p>What could the shape be?
  I was trying the following</p>
  <pre><code>...
  sh: property [
     sh:path schema:colors ;
     sh:class rdf:Seq ;
     sh:property [ 
         sh:path &lt;ideally would like a regex here&gt; ;
         # or a way to identify the path to data tripe
         sh:in (&quot;Red&quot; &quot;Blue&quot; &quot;Green&quot; ) ;
     ] ;
   ] ;
  ...
  </code></pre>