Closed mistermboy closed 2 years ago
apologies, thought i'd responded earlier.
I imagine you already tried with the AND
(try it); you can only elide the AND
if it's between a non-literal node kind (IRI
, BNODE
, NONLITERAL
) and a shape reference (@:User
) (or inline-shape declaration with the {...}
).
If you're a fan of grammars, this comes from:
[45] tripleConstraint ::= predicate inlineShapeExpression cardinality? [11] inlineShapeExpression ::= inlineShapeAnd ("OR" inlineShapeAnd) [15] inlineShapeAnd ::= inlineShapeNot ("AND" inlineShapeNot) // <--
AND
[17] inlineShapeNot ::= "NOT"? inlineShapeAtom [20] inlineShapeAtom ::= nonLitNodeConstraint inlineShapeOrRef? | litNodeConstraint | inlineShapeOrRef nonLitNodeConstraint? | '(' shapeExpression ')' | '.' [24] litNodeConstraint ::= "LITERAL" xsFacet | datatype xsFacet // <--xsd:string
| valueSet xsFacet* | numericFacet+ [22] inlineShapeOrRef ::= inlineShapeDefinition | shapeRef [23] shapeRef ::= ATPNAME_LN | ATPNAME_NS | '@' shapeExprLabel // <--@:User
Though in this case, you'd probably want an OR
instead because nothing is both an xsd:string
and a :User
(try it).
Thanks for the response. I always thought it was possible to do that in shex :sweat:
I´m not able to parse the following schema:
It throws the following error:
I think an "and" keyword is expected between the node constraint and the shapeRef, but the shex grammar allows it to be omitted, doesn't it?