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

Re: AW: Thoughts on validation requirements

From: Eric Prud'hommeaux <eric@w3.org>
Date: Tue, 29 Jul 2014 06:43:25 -0400
To: "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
Cc: public-rdf-shapes@w3.org, Dimitris Kontokostas <kontokostas@informatik.uni-leipzig.de>, "Bosch, Thomas" <Thomas.Bosch@gesis.org>
Message-ID: <20140729104310.GA18957@w3.org>
* Peter F. Patel-Schneider <pfpschneider@gmail.com> [2014-07-28 07:54-0700]
> On 07/28/2014 02:20 AM, Eric Prud'hommeaux wrote:
> >On Jul 28, 2014 12:08 AM, "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
> >wrote:
> >>
> >>On 07/27/2014 02:36 AM, Bosch, Thomas wrote:
> >>>
> >>>Hi Dimitris
> >>>
> >>[...]
> >>
> >>>Regarding ShEx:
> >>>
> >>>- I am also unconfortable with the un-typed validation but I also see
> >the need
> >>>to support it. Unless of course RDF somewhere specifies that every
> >resource
> >>>MUST have a rdf:type. This however should not be the primary focus of
> >ShEx
> >>>since it is not the common case.
> >>
> >>
> >>[...]
> >>
> >>
> >>I'm still trying to figure out how ShEx is supposed to be used for
> >validation.  I could make some guesses, but I think that it would be better
> >for someone how was involved with ShEx to tell me.
> >
> >I'm guessing here from your exploration of ShEx that you see how one
> >can verify a node in an instance graph against a start rule in a
> >schema but you are unclear on why and when one would want to.
> 
> Well, I can see that this is something that could be part of
> validation, but I don't see how this can be used as the sole basis
> of validation.
> 
> >My
> >guess might be wrong so I'll just describe a use case at a high level
> >and ask wait for you to ask specific questions.
> >
> >The XML world topically uses XML Schema and RelaxNG to communicate
> >structural constraints which apply at a particular point in a
> >process. A good example is WSDL which associates a service with a
> >particular schema. This is used to generate code and validate the
> >exchanged messages. LDP is a good analog of this in RDF-land. Resource
> >Shapes uses oslc:resourceShape to tie an LDP service to a schema
> >describing what graph shapes that service works with.
> ><http://www.w3.org/Submission/2014/SUBM-shapes-20140211/#resourceShape>
> >The ShEx semantics are an attempt to formalize the apparent behavior
> >of Resource Shapes to clarify, e.g. verification WRT a value set
> ><http://www.w3.org/mid/53C917E6.7020701@gmail.com>.
> 
> I can see how ShEx might be a specification of this.
> 
> >I may not have answered your question, but perhaps we can work from here.
> 
> I don't think that I can work from there to RDF validation in general.
> 
> XML is very, very different from RDF in so many ways.  In XML, one
> expects that a message/document contains a single something and that
> the consumer will work on that something.  This makes validation the
> process of determining whether that something meets some constraint.

Another salient difference is that there is more of an emphasis on
reuse in RDF. It's possible in both, and there are lots of examples of
XML schemas composed of other schemas, but the plumbing of RDF makes
it tons easier.


> An RDF document, on the other hand, almost invariably contains
> multiple somethings, very often not arranged in a tree, and
> sometimes even without any connection between them.  In RDF it is
> generally permissable to have any sort of information, whereas XML
> information is generally required to fit into what is expected.

I agree, but fear this is a sort of selection bias. Perhaps the
majority of LDP uses include a backend which is not a triple store
(possibly SQL, possibly state stored in the position of a lightswitch
on a wall). In these cases, the data one posts must be limited to the
exact arrangement of somethings that the server expects or data will
be (silently) dropped. I suspect that the majority of the business use
cases on the horizon for RDF involve services that are not willing to
store arbitrary triples.


> Validation then should work differently in RDF than in XML.  My view
> of RDF validation is determining whether the instances of a type
> (not necessarily explicitly signalled by an rdf:type link) meet some
> constraint, and that RDF validation generally involves multiple
> types, often unrelated types.  I don't see how ShEx can do this, and
> thus my questions as to how ShEx can do RDF validation.

What if shapes were types? I think that would meet your definition.
There's some language (ShEx, Resource Shapes, Description Set Profiles
or something else whose name I can't recall) to verify that a node in
an instance graph matches a declared structure in a schema. Some
mechanism like oslc:resourceShape associates a graph node with that
structure. Does that fit your view?


> peter

-- 
-ericP

office: +1.617.599.3509
mobile: +33.6.80.80.35.59

(eric@w3.org)
Feel free to forward this message to any list for any purpose other than
email address distribution.

There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.
Received on Tuesday, 29 July 2014 10:43:30 UTC

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