@prefix ex: <http://example.org/>.
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix sht: <http://www.w3.org/ns/shacl-test#>.

<> a mf:Manifest;
  mf:entries (<inheritance-multi-level-implicit-target>).

ex:BottomShape a rdfs:Class;
  rdfs:subClassOf ex:MidShape.

ex:invalidBottomInstance a ex:BottomShape.

ex:MidShape a rdfs:Class;
  rdfs:subClassOf ex:TopShape.

ex:prop
  sh:minCount 1;
  sh:path ex:name.

ex:TopShape a rdfs:Class, sh:NodeShape;
  sh:property ex:prop.

<inheritance-multi-level-implicit-target> a sht:Validate;
  rdfs:label "Test of multi level subclasses in shapes with implicit targetClass";
  mf:action [
      sht:dataGraph <>;
      sht:shapesGraph <>
    ];
  mf:result [ a sh:ValidationReport;
      sh:conforms false;
      sh:result [ a sh:ValidationResult;
          sh:focusNode ex:invalidBottomInstance;
          sh:resultPath ex:name;
          sh:resultSeverity sh:Violation;
          sh:sourceConstraintComponent sh:MinCountConstraintComponent;
          sh:sourceShape ex:prop
        ]
    ].
