Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Meta-validation file (shsh) #135

Open
wouterbeek opened this issue May 14, 2021 · 2 comments
Open

Meta-validation file (shsh) #135

wouterbeek opened this issue May 14, 2021 · 2 comments
Labels
SHACL 1.1 Marks items that are reasonably significant changes for a potential SHACL 1.1

Comments

@wouterbeek
Copy link

wouterbeek commented May 14, 2021

The SHACL standard links to a file (shsh) that can be used to validate SHACL files with. The file makes assumptions about which syntax is used to encode the validated SHACL file with. As such, it makes assumptions about term types (blank nodes / IRIs / literals) that are not substantive.

Because of this, the shsh file can be used to validate some but not all SHACL files. Specifically, SHACL files that legitimately choose to use IRIs for intermediate terms in RDF lists do not validate correctly, because the shsh file assumes that these terms are blank nodes.

Specifically, the shsh file cannot be used to validate SHACL files that use well-known IRIs as blank node replacements. (The approach to consistently replace blank nodes by well-known IRIs is part of the RDF 1.1 standard.)

Expected

I expect the shsh file to distinguish between different kinds of property paths based on substantive/structural properties and not based on non-substantive/syntactic properties.

Example

An example of the use of syntactic constraints by the current shsh file is shown in the following snippet:

shsh:PathNodeShape
  sh:xone
    ( # 2.3.1.1: Predicate path
      [ sh:nodeKind sh:IRI ]
      # 2.3.1.2: Sequence path
      [ sh:nodeKind sh:BlankNode;
        sh:node shsh:PathListWithAtLeast2Members ]
      ... ).

^ Notice that predicate paths are assumed to be represented by IRIs. This assumption is valid: while blank nodes can be used to denote properties, such property-denoting blank nodes cannot appear in the predicate position of a triple in regular RDF 1.1 syntax.

^ Notice that sequence paths are assumed to be represented by blank nodes. This assumption is not valid: a sequence is represented by an RDF 1.1 list. The only syntactic restriction on intermediated terms in an RDF list is that they are subject terms (blank nodes or IRIs).

@wouterbeek
Copy link
Author

Issue #121 touches on this issue and even includes an alternative to the shsh file that fixes the here observed shortcoming in some but not all cases.

@HolgerKnublauch
Copy link
Contributor

I think the shsh graph should become its own document instead of being an appendix to SHACL. Then the future maintainers of that graph could implement the suggested changes. It was really just rushed through at the very end of the data shapes WG and would benefit from a more comprehensive solution.

I'll mark this as SHACL 1.1 to see if we can split this off from the main spec.

@HolgerKnublauch HolgerKnublauch added the SHACL 1.1 Marks items that are reasonably significant changes for a potential SHACL 1.1 label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SHACL 1.1 Marks items that are reasonably significant changes for a potential SHACL 1.1
Projects
None yet
Development

No branches or pull requests

2 participants