ambiguous wording in https://www.w3.org/TR/sparql11-query/#construct - Erratum?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ambiguous wording in https://www.w3.org/TR/sparql11-query/#construct - Erratum?

Axel Polleres-5
Dear all,

Egor just pointed me to the following wording, which might be understood ambiguous
in https://www.w3.org/TR/sparql11-query/#construct

In the beginning of 16.2 it is clearly said, that COSNTRUCT computes triples "per query solution in the solution *sequence*", i.e. for solutions of a cardinality > 1, two solutions need to be considered:

"The result is an RDF graph formed by taking each query solution in the solution sequence, substituting for the variables in the graph template, and combining the triples into a single RDF graph by set union."

That clearly reflects our intention... However:

In Section 16.2.1 about Templates with blank nodes the wording is less clear and might be misunderstood:

"A template can create an RDF graph containing blank nodes. The blank node labels are scoped to the template for each solution. If the same label occurs twice in a template, then there will be one blank node created for each query solution, but there will be different blank nodes for triples generated *by different query solutions*."

"by different query solutions" is ambiguous in the sense that it is not clear what "different solutions" means, i.e. whether in the set or bag (i.e. sequence), sense of 'solution'. In order to make this clearer, I'd suggest a small erratum/clarification with the following wording:

"A template can create an RDF graph containing blank nodes. The blank node labels are scoped to the template for each solution. If the same label occurs twice in a template, then there will be one blank node created for each query solution, but there will be different blank nodes for generated triples *for each solution in the solution sequence*.

This is easily illustrated by the following example:

Graph:

 :s :p :o .

Query:

 CONSTRUCT { ?s ?p []}
 WHERE{ {?s ?p ?o}
        UNION
        {?s ?p ?o} }


which produces 2 triples with 2 different blank nodes.

best regards,
Axel


--
Prof. Dr. Axel Polleres
Institute for Information Business, WU Vienna
url: http://www.polleres.net/  twitter: @AxelPolleres


Reply | Threaded
Open this post in threaded view
|

Re: ambiguous wording in https://www.w3.org/TR/sparql11-query/#construct - Erratum?

Andy Seaborne-4
Hi Axel,

That suggestion would do no harm - would you like to add it to the
errata document?

     Andy

On 06/03/16 09:33, Axel Polleres wrote:

> Dear all,
>
> Egor just pointed me to the following wording, which might be understood ambiguous
> in https://www.w3.org/TR/sparql11-query/#construct
>
> In the beginning of 16.2 it is clearly said, that COSNTRUCT computes triples "per query solution in the solution *sequence*", i.e. for solutions of a cardinality > 1, two solutions need to be considered:
>
> "The result is an RDF graph formed by taking each query solution in the solution sequence, substituting for the variables in the graph template, and combining the triples into a single RDF graph by set union."
>
> That clearly reflects our intention... However:
>
> In Section 16.2.1 about Templates with blank nodes the wording is less clear and might be misunderstood:
>
> "A template can create an RDF graph containing blank nodes. The blank node labels are scoped to the template for each solution. If the same label occurs twice in a template, then there will be one blank node created for each query solution, but there will be different blank nodes for triples generated *by different query solutions*."
>
> "by different query solutions" is ambiguous in the sense that it is not clear what "different solutions" means, i.e. whether in the set or bag (i.e. sequence), sense of 'solution'. In order to make this clearer, I'd suggest a small erratum/clarification with the following wording:
>
> "A template can create an RDF graph containing blank nodes. The blank node labels are scoped to the template for each solution. If the same label occurs twice in a template, then there will be one blank node created for each query solution, but there will be different blank nodes for generated triples *for each solution in the solution sequence*.
>
> This is easily illustrated by the following example:
>
> Graph:
>
>   :s :p :o .
>
> Query:
>
>   CONSTRUCT { ?s ?p []}
>   WHERE{ {?s ?p ?o}
>          UNION
>          {?s ?p ?o} }
>
>
> which produces 2 triples with 2 different blank nodes.
>
> best regards,
> Axel
>
>
> --
> Prof. Dr. Axel Polleres
> Institute for Information Business, WU Vienna
> url: http://www.polleres.net/  twitter: @AxelPolleres
>
>