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

Re: Defining exclusive or in core SHACL

From: Dimitris Kontokostas <kontokostas@informatik.uni-leipzig.de>
Date: Mon, 23 Nov 2015 16:13:24 +0200
Message-ID: <CA+u4+a1hOeMZ-cPF90wWxqYeMBpTm-b-hdb-=5a-ABCgJVtWyQ@mail.gmail.com>
To: "Gray, Alasdair J G" <A.J.G.Gray@hw.ac.uk>
Cc: Jose Emilio Labra Gayo <jelabra@gmail.com>, "public-rdf-shapes@w3.org" <public-rdf-shapes@w3.org>
Hi Jose,

I could not find the resolution but IIRC we decided to drop XOR support
completely after this issue
https://www.w3.org/2014/data-shapes/track/issues/85

Best,
Dimitris

On Mon, Nov 23, 2015 at 3:20 PM, Gray, Alasdair J G <A.J.G.Gray@hw.ac.uk>
wrote:

> I suspect that the same problem arises if you want to capture the
> constraint that a single created date property is provided but its type can
> be any of the xsd date types, i.e. in ShEx I wrote
> <Item> {
> (dct:created  xsd:date | dct:created  xsd:dateTime | dct:created
> xsd:gYearMonth | dct:created xsd:gYear | dct:created psd:dateTime)
> }
>
> Alasdair
>
>
> On 22 Nov 2015, at 07:47, Jose Emilio Labra Gayo <jelabra@gmail.com>
> wrote:
>
> Imagine that I want to declare items that either have rdfs:label or
> rdfs:comment, but no both.
>
> I ShEx, I can define:
>
> <Item> {
>  rdfs:label xsd:string | rdfs:comment xsd:string
> }
>
> In Shacl, I was able to define it in the following way:
>
> :Item a sh:Shape ;
>  sh:constraint [
>  a sh:OrConstraint ;
>  sh:shapes (
>     [ sh:property [
>       sh:predicate rdfs:label ;
>       sh:datatype xsd:string ;
>       sh:minCount 1 ;
>       sh:maxCount 1 ;
>     ]]
>     [ sh:property [
>       sh:predicate rdfs:comment ;
>       sh:datatype xsd:string ;
>       sh:minCount 1 ;
>       sh:maxCount 1 ;
>     ]]
>   )
>  ] ;
>  sh:constraint [
>   a sh:NotConstraint ;
>   sh:shape [
>     sh:constraint [
>     a sh:AndConstraint ;
>     sh:shapes (
>      [sh:property [
>       sh:predicate rdfs:label ;
>       sh:datatype xsd:string ;
>       sh:minCount 1 ;
>       sh:maxCount 1
>      ]]
>      [sh:property [
>       sh:predicate rdfs:comment ;
>       sh:datatype xsd:string ;
>       sh:minCount 1 ;
>       sh:maxCount 1
>      ]] )
>    ]
>   ]
>  ]
> .
>
> Is there any other way to do this in SHACL?
>
> --
> -- Jose Labra
>
>
> Alasdair J G Gray
> Fellow of the Higher Education Academy
> Assistant Professor in Computer Science,
> School of Mathematical and Computer Sciences
> (Athena SWAN Bronze Award)
> Heriot-Watt University, Edinburgh UK.
>
> Email: A.J.G.Gray@hw.ac.uk
> Web: http://www.alasdairjggray.co.uk
> ORCID: http://orcid.org/0000-0002-5711-4872
> Office: Earl Mountbatten Building 1.39
> Twitter: @gray_alasdair
>
>
>
>
>
>
>
>
>
>
>
>
>
> We invite research leaders and ambitious early career researchers to join
> us in leading and driving research in key inter-disciplinary themes. Please
> see www.hw.ac.uk/researchleaders for further information and how to
> apply.
>
> Heriot-Watt University is a Scottish charity registered under charity
> number SC000278.
>



-- 
Dimitris Kontokostas
Department of Computer Science, University of Leipzig & DBpedia Association
Projects: http://dbpedia.org, http://rdfunit.aksw.org, http://
http://aligned-project.eu
Homepage:http://aksw.org/DimitrisKontokostas
Research Group: http://aksw.org
Received on Monday, 23 November 2015 14:14:26 UTC

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