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

Re: Some questions on ShEx specification

From: Jose Emilio Labra Gayo <jelabra@gmail.com>
Date: Thu, 6 Feb 2014 07:55:52 +0100
Message-ID: <CAJadXXL186CT8XraO7WVe=1oa4ry7TG339phEQGNDfKubN90vQ@mail.gmail.com>
To: "Eric Prud'hommeaux" <eric@w3.org>
Cc: public-rdf-shapes@w3.org
On Wed, Feb 5, 2014 at 4:24 PM, Eric Prud'hommeaux <eric@w3.org> wrote:

> * Jose Emilio Labra Gayo <jelabra@gmail.com> [2014-02-05 11:47+0100]
> > I have a small set of questions about the ShEx abstract syntax
> > specification:
> >
> > 1.- Is it necessary the field "id: Label" in the arcrule? (
> > http://www.w3.org/2013/ShEx/Definition#as_defn_ArcRule)
>
> The goal of the label on a rule is that you be able to take advantage of
> the fact that ShEx compiles to RDF. There are countless use cases that can
> be met by augmenting the data in a grammar, e.g. oslc:maxSize and other
> stuff in <
> http://open-services.net/bin/view/Main/OSLCCoreSpecAppendixA#Value_type_Property>.
> This allows us to fasten arbitrary extra properties to a rule.
>

OK, but looking at the grammar, I noticed that id's are optional. Maybe,
the definition of arcRule should be:

(id:Label <http://www.w3.org/2013/ShEx/Definition#as_defn_Label>?, n:
NameClass <http://www.w3.org/2013/ShEx/Definition#as_defn_NameClass>, v:
ValueClass <http://www.w3.org/2013/ShEx/Definition#as_defn_ValueClass>,
min:Integer, max:Integer,
a:Set(Action<http://www.w3.org/2013/ShEx/Definition#as_defn_Action>
))

to signal that the label is optional...in Scala, it is easy because we can
employ "Option[Label]" :)

 > 2.- Should we have Set[RDFNode] in ValueSet instead of Set[IRI] so we
> could
> > define, for example:
> >     <a> { :p (1 2) }  ? (
> > http://www.w3.org/2013/ShEx/Definition#as_defn_ArcRule)
>
> yup, already implemented that way.
> fixed, modulo s/RDFNode/RDFTerm/
>
> OK, looking now at the grammar, I think the definition of ValueType should
also be:

ValueType ::= type:RDFTerm

because I think it comes from the "object" rule and it accepts bNodes and
literals...


> > 4..- I also think, "start" should be added to the Schema abstract
> > syntax...such as Schema = (shapes: Set[Shape], start = Label) ?
>
> I wish I'd read this before answering the previous issue. Apparently we
> agree. I make the schema start be the actual rule rather than its label,
> but I'm not sure which is better.
>

> I forget Set notation for optional. How's this:?
>
> Schema  ::= (rules:Set((Label, Rule)), start:Rule?
>
> I think that definition is right. I agree that using "Rule" for start
instead of "Label" is better because we can avoid possible errors of start
labels that are not part of the rules.

The use of "?" for optional is right for me...and as i said, in Scala, it
is just "Option[Rule]"

Best regards, Jose Labra
Received on Thursday, 6 February 2014 06:56:39 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 6 February 2014 06:56:40 UTC