Re: shapes-ISSUE-107 (annotations v. arguments): annotations and arguments use different mechanisms for specifying the SPARQL variable name [SHACL Spec]

Arguments and annotations have different scopes but if aligning is
necessary I would go this way:

We can drop sh:annotationVarName and use a similar NCName mechanism in
sh:annotationValue.
The value of sh:annotationValue can be an IRI or a literal.
If the value is an IRI and the NCName of the IRI matches a SPARQL variable
(or a JS variable if supported later) the values for this result annotation
are taken from the SPARQL Query.
If the NCName of the IRI does not match a SPARQL variable or the value is a
literal then the value is taken as constant and copied on the results.

In RDFUnit I have only rut:annotationValue but prepend '?' in front of a
sparql variable to make the parsing easier without the need of the sparql
query. For example

   - static IRI:
   https://github.com/AKSW/RDFUnit/blob/master/rdfunit-core/src/main/resources/org/aksw/rdfunit/configuration/autoGeneratorsOWL.ttl#L221-L224
   - SPARQL Var:
   https://github.com/AKSW/RDFUnit/blob/master/rdfunit-core/src/main/resources/org/aksw/rdfunit/configuration/autoGeneratorsOWL.ttl#L221-L224
   - Literals:
   https://github.com/AKSW/RDFUnit/blob/master/rdfunit-core/src/main/resources/org/aksw/rdfunit/configuration/patterns.ttl#L917-L921
   (in this case the value is a literal when the pattern bindings are
   applied)





On Fri, Oct 30, 2015 at 7:22 AM, Holger Knublauch <holger@topquadrant.com>
wrote:

> One way of resolving this would be to drop sh:annotationVarName and rely
> on sh:annotationProperty only, using the same NCName mechanism as used
> elsewhere. This would slightly limit the use cases, because variable and
> property names would have to be always aligned.
>
> I have no strong opinion, and this feature was mainly driven by Dimitris,
> so I would like him to make a proposal.
>
> Holger
>
>
>
> On 10/30/2015 6:51, Arthur Ryman wrote:
>
>> +1
>>
>> Also, the definition of the local name of results in an NCName. This
>> is safe as a SPARQL variable. I assume it is safe enough for
>> Javascript.
>>
>> -- Arthur
>>
>> On Wed, Oct 28, 2015 at 10:58 PM, RDF Data Shapes Working Group Issue
>> Tracker <sysbot+tracker@w3.org> wrote:
>>
>>> shapes-ISSUE-107 (annotations v. arguments): annotations and arguments
>>> use different mechanisms for specifying the SPARQL variable name [SHACL
>>> Spec]
>>>
>>> http://www.w3.org/2014/data-shapes/track/issues/107
>>>
>>> Raised by: Peter Patel-Schneider
>>> On product: SHACL Spec
>>>
>>> Annotation properties use sh:annotationVarName to provide the SPARQL
>>> variable name to use.  Arguments use the local part of their IRI.  It would
>>> be better to have one mechanism.
>>>
>>>
>>>
>>>
>
>


-- 
Dimitris Kontokostas
Department of Computer Science, University of Leipzig & DBpedia Association
Events: http://wiki.dbpedia.org/meetings/California2015 (Nov 5th)
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 Friday, 30 October 2015 08:04:11 UTC