W3C home > Mailing lists > Public > public-rdf-shapes@w3.org > April 2015

Re: vote for supporting "closed shapes"

From: John Walker <john.walker@semaku.com>
Date: Mon, 27 Apr 2015 07:35:31 +0200
Message-Id: <58607203-F939-41AE-A95E-31D76AC9CD46@semaku.com>
Cc: "public-rdf-shapes@w3.org" <public-rdf-shapes@w3.org>
To: Holger Knublauch <holger@topquadrant.com>

On 27 Apr 2015, at 03:47, Holger Knublauch <holger@topquadrant.com> wrote:

> On 4/25/2015 1:21, Erik Wilde wrote:
>> that's the problem: ideally, you would want to have a vocabulary identified, so that terms from it can be identified as belonging to it. in XML, namespaces do that for you, and because that's a very usefu scoping mechanism, that's how a lot of vocabularies are defined and used.
> Hi Erik,
> to clarify: are you looking for some way to express that a given resource can only have properties from a certain namespace? For example,
> SELECT ?subject ?predicate ?object
>    ?subject ?predicate ?object .
>    FILTER (!STRSTARTS(str(?predicate), "http://example.org/ns#"))
> }
> would return all triples of the given ?subject that have a predicate from another namespace than the provided one.
> A query as above would be straight-forward to generalize into a SHACL template, so that the syntax would be something like
> ex:ExampleShape
>    sh:constraint [
>        a sh:ClosedShapeByIRIConstraint ;
>        sh:allowedIRIStarts ( "http://example.org/ns#" ) ;
>    ] .
> Does this look about right? (I'd be happy to write this down as a requirement for our catalogue so that the WG can vote on it).
> Thanks,
> Holger

In general I expect this would be much easier if said vocabulary were identified with a URI and the terms from the vocabulary (i.e. the properties, classes and individuals) related to it using a property like rdfs:isDefinedBy.

Received on Monday, 27 April 2015 05:36:01 UTC

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