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

Re: Shapes/ShEx or the worrying issue of yet another syntax and lack of validated vision.

From: Jose Emilio Labra Gayo <jelabra@gmail.com>
Date: Fri, 18 Jul 2014 11:22:31 +0200
Message-ID: <CAJadXXLG7ZmLsbt0g23gMv=-K613cxg5ctRVEkUgX+yM5h8g1w@mail.gmail.com>
To: "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
Cc: Karen Coyle <kcoyle@kcoyle.net>, "public-rdf-shapes@w3.org" <public-rdf-shapes@w3.org>
No, the ShEx definition defined by Eric opted by open shapes, so in this
case, it passes.

You can check it with Eric's implementation: http://goo.gl/RHjVLZ

In my Shexcala implementation, I first implemented closed shapes by default
and it would fail, later, I thought it would be better to handle both open
and closed, and now, by default it uses open shapes so Shexcala has the
same behaviour as Eric's implementation.

You can check my implementation here: http://goo.gl/YUDFCV

And if you add the flag to use closed shapes by default it would not pass.
You can also check that behaviour here: http://goo.gl/CssEzF

However, as I said before, I am more in favour to allow both behaviours and
indicate which one you prefer with some syntax. In a previous email I
suggested to use curly braces for open shapes or square brackets for closed
shapes...but this is just one possibility and is not implemented yet.

We have also been collected a set of test cases where you can see the
different possibilities. The test-suite is available here:
http://shexspec.github.io/test-suite/

Best regards, Jose Labra


On Fri, Jul 18, 2014 at 11:01 AM, Peter F. Patel-Schneider <
pfpschneider@gmail.com> wrote:

>
>
> On 07/18/2014 01:28 AM, Jose Emilio Labra Gayo wrote:
>
>>              So you are saying that ShEx is ambiguous as to whether open
>> or closed
>>              semantics is to be applied?  That seems to be a problem with
>> the ShEx
>>              definition.
>>
>>
>>         No, I am saying that there are two ways to implement Shape
>>         expressions...one
>>         with the open shapes that allows remaining triples and one with
>> closed
>>         shapes
>>         which disallows them.
>>
>>
>>     That's what I said, I think.
>>
>>
>> Well, you asked if ShEx "is ambiguous as to whether open or closed
>> semantics
>> is to be applied?" and I answered no. Because it is not ambiguous with
>> regards
>> to open or closed semantcs. It just can handle open shapes or closed
>> shapes.
>>
>> In fact, what I propose is a syntax for ShEx so a user can declare an open
>> shape or a closed shape, which in my opinion is the best solution and is
>> similar to what regular expressions offer.
>>
>> Best regards, Jose Labra
>>
>
>
> The ShEx definition provides a specification for evaluating shape
> expressions.  I was expecting that this would tell me what the result of
> evaluating a ShEx schema against an RDF graph is (perhaps with a particular
> starting point).
>
> So, for example, I was expecting to be able to look at the definition and
> determine whether
>
> <Sh> { ex:foo (ex:bar) }
>
> validates the RDF graph below, starting with ex:w
>
> ex:w ex:foo ex:bar .
> ex:w ex:new ex:junk .
>
> But you are telling me that that is not the case.  You are saying that the
> result here can be either pass or fail.  If true, that's an ambiguity in
> the ShEx definition.
>
> peter
>



-- 
Saludos, Labra
Received on Friday, 18 July 2014 09:23:18 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:39 UTC