Re: on lists

It is a bit surprising that there doesn't seem to be a standard 
definition of what a well-formed rdf:List is. The closest discussion I 
could find was

     https://www.w3.org/2011/rdf-wg/track/issues/102

which was marked as not resolved due to lack of time. Then RDFS 1.1 only 
defines the vocabulary, without prescribing anything. And Turtle is only 
formulated for parsing purposes.

On 15/10/2016 0:20, Peter F. Patel-Schneider wrote:
> Well that is a definition of lists.  It that what the working group wants for
> lists?  The members of a list form a bag, not a set.

 From the use cases in SHACL I could not see any case where it would 
make a difference that a list forms a bag or a set. Neither the order 
nor duplicates make a difference, unless I am missing something.


>
> Note that this definition allows lists like
>
> rdf:nil rdf:next rdf:nil ;
>          rdf:first ex:e1 .

I assume you mean rdf:rest, not rdf:next?

>
> and may allow lists like
>
> ex:l1 rdf:next ex:l1 ;
>        rdf:first ex:e2 .
>
> and even
>
> ex:il1 rdf:next ex:il2 ;
>         rdf:first exI:ile1 .
> ex:il2 rdf:next ex:il3 ;
>         rdf:first exI:ile2 .
> ...

Yes these would be allowed, but I see no problems with these cases. In 
fact the algorithm to traverse a list (using the rdf:rest*/rdf:first 
SPARQL path) seems quite easy to implement. In practice, I believe it is 
fair to assume that the rdf:Lists will be following the well-established 
patterns as they will be derived from Turtle or JSON-LD syntax.

In any case, I have added another statement to clarify that rdf:nil 
cannot have rdf:first or rdf:rest.

https://github.com/w3c/data-shapes/commit/1cb7401d4e237ad243ea73f31d0ac27ca0dedfd4

Holger

>
> peter
>
>
> On 10/13/2016 08:59 PM, Holger Knublauch wrote:
>> I have tried to address this comment through this commit:
>>
>> https://github.com/w3c/data-shapes/commit/3483adcf525cc6f29a47748dfcb85c0baeb29f81
>>
>>
>> This basically defines the terms RDF list and member, with the goal that they
>> are used consistently.
>>
>> Please confirm if this addresses your issue, or what else needs to be done.
>>
>> Thanks,
>> Holger
>>
>>
>> On 14/10/2016 11:46, Peter F. Patel-Schneider wrote:
>>> Lists are used in several places in SHACL but there is no definition of
>>> what constitutes an acceptable list or an acceptable well-formed list or
>>> what is a list member or what is list containment.  This is yet another
>>> example of loose terminology.
>>>
>>>
>>> Peter F. Patel-Schneider
>>> Nuance Communications
>>>
>>>
>>>
>>> "2. If the graph contains a triple of the form p rdf:first elt, the path must
>>> be a well-formed RDF list with a at least two members. Each member must be
>>> valid SHACL property path that is converted into a sequence of either
>>> SequencePath or AlternativePath elements.
>>> 3. If the graph contains a triple of the form p sh:alternativePath elt, the
>>> value of path must be a well-formed RDF list with a at least two
>>> members. All members must be valid SHACL property paths that become a series
>>> of AlternativePath elements."
>>>
>>> "Property     Value Type     Summary
>>> sh:languageIn     rdf:List     A list of language ranges (list members are
>>> xsd:string)"
>>>
>>> "Property     Value Type     Summary
>>> sh:and     rdf:List (members: sh:Shape)     List of shapes to validate the
>>> value
>>> nodes against"
>>>
>>> "Property     Value Type     Summary
>>> sh:or     rdf:List (members: sh:Shape)     List of shapes to validate the value
>>> nodes against"
>>>
>>> "The value of the sh:partition constraint parameter MUST be an rdf:List that
>>> contains zero or more resources."
>>>
>>> "Each member of the list is used by the SHACL processor to match a subset of
>>> the value nodes. "
>>>
>>> "Property     Value Type     Summary
>>> sh:closed     xsd:boolean     Set to true to close the shape
>>> sh:ignoredProperties     rdf:List (members: rdf:Property)     Optional
>>> list of properties that are also permitted in addition to those explicitly
>>> enumerated via sh:property "
>>>
>>> "Property     Value Type     Summary
>>> sh:in     rdf:List     Enumeration of allowed values"
>>>
>>> "The values of sh:in must be well-formed rdf:Lists. The members of that
>>> rdf:List must not be blank nodes. A validation result must be produced for
>>> every value node that is not a member of the given list. "
>>>
>>

Received on Sunday, 16 October 2016 03:57:50 UTC