shexSpec / shex

ShEx language issues, including new features for e.g. ShEx2.1
25 stars 8 forks source link

Predicate filters #29

Open labra opened 7 years ago

labra commented 7 years ago

The first version of ShEx contained a feature that was lost, which was the possibility to filter the predicates in a triple constraint.

So, for example one could say:

<Product> {
  schema:name . ;
  schema:~ . *
}

which would mean a mandatory schema:name predicate and zero or more predicates from the schema: namespace.

It was also possible to have exclusions like:

<Product> {
 schema:name . ;
 - foaf:~ . * 
}

to indicate that it is allowed to have zero or more predicates from any namespace except foaf.

I think this feature is interesting and we should consider its inclusion in future ShEx releases.