Skip to content
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

Cardinalities on includes #35

Closed
labra opened this issue Feb 8, 2017 · 6 comments
Closed

Cardinalities on includes #35

labra opened this issue Feb 8, 2017 · 6 comments
Labels
Milestone

Comments

@labra
Copy link
Contributor

labra commented Feb 8, 2017

The following shape is ok:

<S> {
 a [:S] ;
 &<p> ;
 &<p>
}

<definitions> {
  $<p> :p xsd:integer
}

However, the following isn't:

<S> {
 a [:S] ;
 &<p>* 
}

The reason being that the grammar doesn't allow to add cardinalities to the include rule:

[40]    unaryTripleExpr       ::= productionLabel? (tripleConstraint | bracketedTripleExpr) | include
[41] bracketedTripleExpr ::= '(' innerTripleExpr ')' cardinality? annotation* semanticActions

...
[50] include ::= '&' shapeLabel

Should we allow cardinalities in includes?

One possible solution could be to move the include from rule 40 to rule 41:

[41] bracketedTripleExpr ::= '(' innerTripleExpr | include ')' cardinality? annotation* semanticActions

Or just adding an optional cardinality to rule 50.

Is this feasible or is there some reason to forbid cardinalities over includes?

This issue appeared when trying to solve issue #34.

@labra labra added this to the 2.0 milestone Feb 8, 2017
@labra labra added the spec label Feb 8, 2017
@gkellogg
Copy link
Contributor

gkellogg commented Feb 8, 2017

Not in favor of cardinality on inclusions, as these are simply references in the RDF model, and references to things having cardinality. In fact, at the model level, an "inclusion" doesn't really exist, it's simply another TripleExpression which happens to be shared.

@labra
Copy link
Contributor Author

labra commented Feb 8, 2017

I have no strong opinion on this so I would have no problem leaving it as is.

In fact, I found a possible workaraound to the previous example as:

<S> {
 a [:S] ;
 &<ps> ;
}

<definitions> {
  $<ps> :p xsd:integer*
} 

@ericprud
Copy link
Contributor

I -1'd this for 2.0 as well because I don't know how to write it in ShExJ or ShExR.

@labra
Copy link
Contributor Author

labra commented Feb 16, 2017

I agree that we can leave it as it, i.e. without cardinalities on includes.

Should I close the issue as I was the one who raised it or should I wait until next meeting to close it?

@ericprud
Copy link
Contributor

PROPOSAL: close
REASON: decision constrained by RDF/JSON-LD graph
PARTICIPANTS: @labra, @ericprud, @gkellogg
RELATED: ShapeRef and Inclusion redundant in RDF representation

@jimkont
Copy link
Contributor

jimkont commented Feb 17, 2017

RESOLVED in 2017-02-17 meeting accepting #35 (comment) with the following votes:

ericP: +1
Harold: +1
Dimitris: +1
Tom: +1
LarsG: +1
Andra: +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants