Hi all,

using SHACL I am trying to implement a check for identifying typically typos when using standard vocabularies such as RDF, RDFS and OWL, e.g., rdf:label should be rdf*s*:label.

Here is an attempt at finding IRIs in rdfs namespace but that are not defined in the standard vocabulary:

[] a sh:NodeShape ;
  sh:name "RDFS vocabulary element." ;
  sh:message "Unrecognised RDFS vocabulary element. Check spelling." ;
  sh:target [
    a sh:SPARQLTarget ;
    sh:select """
      SELECT ?this
      WHERE { { ?this ?p ?o }
        UNION { ?s ?this ?o }
        UNION { ?s ?p ?this }
FILTER (isIRI(?this) && STRSTARTS(STR(?this), "http://www.w3.org/2000/01/rdf-schema#";))
     } """ ;
    ] ;
sh:in ( rdfs:Class rdfs:Container rdfs:ContainerMembershipProperty rdfs:Datatype rdfs:Literal rdfs:Resource rdfs:comment rdfs:domain rdfs:isDefinedBy rdfs:label rdfs:member rdfs:range rdfs:seeAlso rdfs:subClassOf rdfs:subPropertyOf )
.

This does not work with jena-shacl version 3.16. I am guessing this isbecause advanced features (https://www.w3.org/TR/shacl-af) are not supported? https://jena.apache.org/documentation/shacl/ says: "It implements SHACL Core and SHACL SPARQL Constraints."

Is there a different way of selecting all IRIs as target, which is also supported by jena-shacl? Or maybe a better way of doing this?

Thanks!

Martin

Reply via email to