-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Require top-level shape declarations #50
Comments
The 2.2 version removes all the labeled* shapeExprs (and therefor has a simpler API): Schema {
"@context":"http://www.w3.org/ns/shex.jsonld"?
imports:[IRIREF+]?
startActs:[SemAct+]? start:shapeExprOrRef? shapes:[ShapeDecl|ShapeExternal+]?
}
ShapeDecl { id:shapeExprLabel abstract:BOOL? specializes:[IRIREF+]? shapeExpr:shapeExpr }
ShapeExternal { id:shapeExprLabel }
// Shape Expressions
shapeExpr = ShapeOr | ShapeAnd | ShapeNot | NodeConstraint | Shape;
shapeExprOrRef = shapeExpr | shapeExprRef;
ShapeOr { shapeExprs:[shapeExprOrRef{2,}] }
ShapeAnd { shapeExprs:[shapeExprOrRef{2,}] }
ShapeNot { shapeExpr:shapeExprOrRef }
shapeExprRef = shapeExprLabel ;
shapeExprLabel = IRIREF | BNODE ;
NodeConstraint { nodeKind:("iri"|"bnode"|"nonliteral"|"literal")? datatype:IRIREF? xsFacet* values:[valueSetValue+]? } 2.2 example with external:{ "type": "Schema",
"shapes": [
{ "type": "ShapeDecl", "id": "S1", "shapeExpr": {
"type": "Shape", "expression": {
"type": "TripleConstraint", "predicate": "http://example.org/name"
} } },
{ "type": "ShapeExternal", "id": "S2" }
]
} |
Associated shexTest branch extends_top-level-ShapeDecl passes all JSG tests. |
ericprud
pushed a commit
to shexjs/shex.js
that referenced
this issue
Jun 16, 2022
This was referenced Jun 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
One feature that will be useful for ShEx is to have top-level shape definitions which refer to other shapes. For example:
This change would imply to add more ceremony to the ShExJ. For example:
The changes for the ShExJ would look like:
The old ShExJ would represent it like this:
2.1
The new ShExJ would look like:
2.2
This is related with this PR: shexSpec/shexTest#49
In order to kepp backwards compatibility we may allow the old ShExJ in version 2.2 marking it as deprecated and adding it as an annex.
The text was updated successfully, but these errors were encountered: