- From: JervenBolleman via GitHub <sysbot+gh@w3.org>
- Date: Wed, 08 Feb 2023 17:44:59 +0000
- To: public-shex-dev@w3.org
JervenBolleman has just created a new issue for https://github.com/shexSpec/shex: == JSON-LD as constraind by grammar is limiting == There are many ways to write JSON-LD documents that could express Shape Expressions. However, many of these reasonable serializations are not valid ShexJ files. e.g. ```json { "@context": { "@vocab" : "http://www.w3.org/ns/shex.jsonld", "foaf" : "http://xmlns.com/foaf/0.1/" , "predicate" : {"@type":"@id"}}, "type": "Schema", "shapes": [ { "@id": "http://my.example/#UserShape", "type": "Shape", "expression": { "type": "TripleConstraint", "predicate": "foaf:name", "valueExpr": { "type": "NodeConstraint", "datatype": "http://www.w3.org/2001/XMLSchema#string" } } } ] } ``` [This is](https://tinyurl.com/mf9wrvw4) a small adaptation of one of the [primer examples](https://shexspec.github.io/primer/#tripleConstraints) but is not a valid ShexJ file. The example here and the JSON-LD in the primer are equivalent RDF wise. A solution could be to add a standard JSON-LD framing to generate JSON-LD that fits into the grammar. Other option is to use ShexR as the basis for defining ShexJ. Why is this important, it is quite normal to generate some Shex shapes based on the output of some existing RDF dataset, and the fact that we can't directly sparql construct the shapes is unfortunate. Please view or discuss this issue at https://github.com/shexSpec/shex/issues/120 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 8 February 2023 17:45:00 UTC