W3C home > Mailing lists > Public > public-rdf-shapes@w3.org > February 2014

Re: Reverse arcs in Shapes

From: Jose Emilio Labra Gayo <jelabra@gmail.com>
Date: Thu, 6 Feb 2014 07:03:54 +0100
Message-ID: <CAJadXXL9bobrpeZakKL4iovtpujB3Q43pqscUS732=O1QjfiiA@mail.gmail.com>
To: "Eric Prud'hommeaux" <eric@w3.org>
Cc: public-rdf-shapes@w3.org
>
> > I think a good extension of the current ShEx specification could be to
> allow reverse arcs, which would allow to express constraints on the shape
> of arcs that arrive to a given node, i.e. not only on the arcs departing
> from a node, but also the arcs that receives a node.
> >
> > For example, if I want to express that countries are the reference area
> of zero or more observations, I can express it by:
> >
> > <Country> {
> >        rdfs:label xsd:string ,
> >        ^ :ref-area @<observation>*  # ^ means that it receives the arc
> ":ref-area"
> > }
> >
> > <Observation> {
> >     :value xsd:integer ,
> >     :ref-area @<Country>
> > }
> >
> > In this way, a model like the following could validate:
> >
> > :esp rdfs:label "Spain" .
> >
> > :o1 :value 23, :ref-area :esp .
> > :o2 :value 45, :ref-area :esp .
> >
> > I used the symbol "^" but I am not sure if it is reserved for other
> purposes.
> >
> > In fact, I noticed that the BNF grammar (
> http://www.w3.org/2013/ShEx/ShEx.bnf) has reserved the symbols "!" and
> "^" at the beginning of arc definitions...what is their purpose?
>
> "Not" and "reverse" respectively. I never implemented them so I don't have
> any idea how complicated they would make the semantics. Seems like a good
> question for the Lille team. (Well, I suspect that "not" would at least be
> weird because it would have to be tested after all of the positives.)
>
Thanks, so I could assume that the previous example makes sense, although
it is not implemented yet.

It is great that you reserved those keywords because reverse arcs appear
often in some of my use cases.

Best regards, Jose Labra
Received on Thursday, 6 February 2014 06:04:41 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 6 February 2014 06:04:42 UTC