Open
Description
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.
{ "@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 a small adaptation of one of the primer examples 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.
Metadata
Metadata
Assignees
Labels
No labels