Re: ISSUE-41 : new thoughts on property paths

On 7/17/15 4:32 PM, Simon Steyskal wrote:
> Hi!
>
> During refactoring of our UCR document, I stumbled across two use 
> cases[1,2] which require that SHACL should allow to express 
> constraints between different properties. While basic scenarios can be 
> handled by using sh:NativeConstraints (as already discussed), a more 
> generic approach that allows to define property paths using the 
> high-level vocabulary might be more feasible (and is requested by [2]).
>
> I was working on a SHACL helper function that takes a focus node and a 
> sh:Path (utilizing SPIN's[3]/Jena's strategy for expressing property 
> paths) as arguments and defines a SPARQL query that should recursively 
> resolve the path, returning a final set of property values. 
> Unfortunately I failed, probably due to well-known limitations of BIND 
> (i.e. wasn't able to pass more than one node through the path).

Are you referring to the lack of a standard mechanism for property 
functions / magic properties?

Holger

>
> Since Holger recently made his SHACL API public, I was able to make 
> some first "hard coded" path parsing attempts which seemed to work out 
> quite well. So I was wondering whether such a high-level path 
> representation whose semantics would have to (most likely) be defined 
> without using a SPARQL template as backbone (but maybe just by 
> providing mappings between path expressions and their respective 
> representation using sh:Path constructs) would be worth to discuss?
>
> For example, (ex:A|ex:B)/ex:C would be represented as:
>
> ex:path a sh:SeqPath ;
>    sh:path1 [ a sh:AltPath ;
>       sh:path1 ex:A ;
>       sh:path2 ex:B
>    ];
>    sh:path2 ex:C .
>
> cheers,
> simon
>
>
> [1] 
> http://w3c.github.io/data-shapes/data-shapes-ucr/#uc27-relationships-between-values-of-multiple-properties
> [2] 
> http://w3c.github.io/data-shapes/data-shapes-ucr/#uc32-non-sparql-based-solution-to-express-constraints-between-different-properties
> [3] http://www.w3.org/Submission/spin-sparql/#sp-TriplePath
>

Received on Friday, 17 July 2015 08:44:26 UTC