w3c / shacl

SHACL Community Group (Post-REC activitities)
27 stars 4 forks source link

SHACL-compact-syntax #7

Closed jeswr closed 4 months ago

jeswr commented 3 years ago

I've been looking into using shaclc in some applications I am working on. I have a couple of questions:

  1. What are the chances of it becoming a standard (at the moment I understand it is a community group draft report) and are there any competing proposals.

  2. What is available in terms of shaclc parsers? The only one I seem to have come across is that used in Topquadrant's SHACL API. Specifically I am looking for a parser in Javascript that can be used in applications licensed under the MIT license.

afs commented 3 years ago

Apache Jena supports SHACL Compact Syntax for both reading and writing. (not javascript)

jeswr commented 3 years ago

Thanks for letting me know.

I ended up implementing my own parser and writer in Typescript/JavaScript in a way that it would be possible to extend the syntax to cover all of SHACL by "escaping" into turtle, whilst also having the option to remain strictly compliant to the SHACLC spec if the user of the library chose to.

I haven't had time to make the tools stable and publish them yet, but I'll add a comment here when I do.

afs commented 3 years ago

Sounds interesting - looking forward to seeing it.

I've had an idea to extend SHACLC with declarations for RDFS.

VladimirAlexiev commented 2 years ago

@afs what declarations do you mean?

As @HolgerKnublauch points out, you can put any triples in a "SHACL file" (because that's just RDF), and some of these are useful/relevant to the shapes as well.

So tacking a generic "RDF container" to SHACL seems like a good idea?

afs commented 2 years ago

<C1> subClassOf <C2> <P1> subPropertyOf <P2>

jeswr commented 1 year ago

@afs almost 2 years late but finally got around to doing this up

  1. https://www.npmjs.com/package/shaclc-parse; a spec compliant parser with an opt-in feature to use a superset of the syntax that allows you to "escape into turtle syntax".
  2. https://www.npmjs.com/package/shaclc-write; a spec compliant writer.

Both are MIT licensed.

HolgerKnublauch commented 4 months ago

In preparation for a potential future SHACL WG I would like to close GitHub issues that were mainly just questions.

Please reopen if you disagree. I guess there could be a separate, newer issue to turn the SHACL Compact Syntax into a more official document.