Re: feedback on "SPARQL Query Language for RDF", v1.139

Changes for section 10:

>     10 Result Forms
> 
> SPARQL has a number of query forms for returning results. These result 
> forms use the solutions from pattern matching the query pattern

 > (KW Comment: is query pattern defined anywhere?)

Added in section 2.3, as text description and a definition (green box).  The 
defintion seems a bit heavy for just this piece fo terminology but it is an 
important term.

 > to form result sets or RDF
> graphs. A /result set/ is a serialization of the bindings in a query 
> result <#defn_QueryResult>. The query forms are:

Done

> 
> ...
> 
> Results can be thought of as a table, with one row per query solution. 
> Some cells may be empty because a variable is not bound in that 
> particular solution. (KW Comment: specify if SPARQL defines some way to 
> check if a variable is not bound in a solution.)

That would be an API operation - and how result sets are ptesented is 
implementation dependent.

> 
> -Results form a set of tuples. However, implementations may include 
> duplicates for implementation and performance reasons unless indicated 
> otherwise by the presence of the DISTINCT keyword.-+Implementations may 
> return the solutions as either a bag or set of results, i.e., with or 
> without duplicates. However, if the DISTINCT keyword is specified, a set 
> of results must be returned, i.e., no duplicates.+

"""
Implementations may return solutions as eother a bag or set, that is, with ot 
without duplicate rows.  However, if the DISTINCT keyword is specificed, a set 
of results must be returned, with no duplicates.
"""

> 
> 
>         SELECT LIMIT
> 
> The LIMIT form puts an upper bound on the number of solutions returned. 
> -A query may return a number of results up to and including the 
> limit.-+The number of results returned is the minimum of LIMIT and the 
> actual number of query results, whichever is lower.+

"""
The LIMIT form puts an upper bound on the number of solutions returned. A query 
may return a number of results up to and including the limit. If the number of 
actual solutions is less than the limit, all solutions will be returned.
"""

> 
> PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
> SELECT ?name
> WHERE ( ?x foaf:name ?name )
> LIMIT 20
> 
> Limits on the number of results can also be applied via the SPARQL query 
> protocol [@@ protocol document not yet published @@].
> 
> +Note that if both DISTINCT and LIMIT are specified, then duplicates are 
> eliminated before the LIMIT is applied.+

Done.
> 
> 
>       10.2 Constructing an Output Graph
> 
> Gives the result graph having just the triples with property foaf:name:
> 
> @prefix foaf: <http://xmlns.com/foaf/0.1/> .
> 
> [] foaf:name "Bob" .
> [] foaf:name "Alice" .
> 
> (KW Comment: what does [ ] denote? This is new notation, I think, and 
> should be explained.)

Changed to _:b1 and _:b2.  Both cases.

> 
> 
>         CONSTRUCT with a template
> 
> ...
> 
> If a triple template has a +variable+, and in a query solution, the 
> variable is unset, then the +substitution+ of this triple template is 
> skipped but other triple templates are still processed for the same 
> solution and any triples from other solutions are included in the result 
> graph.
> 
> 
>         Templates with bNodes
> 
> ...
> 
> A template can create an RDF graph containing bNodes, indicated by the 
> syntax of a prefixed name with prefix _ and some label for the local 
> name.  +The+ labels are scoped to the template for each solution. If 
> two such prefixed names share the same label in the template, then there 
> will be one bNode created for each query solution but there will be 
> different bNodes across triples generated by different query solutions.
> 
> @prefix  foaf:  <http://xmlns.com/foaf/0.1/> .
> 
> _:a    foaf:givenname   "Alice" .
> _:a    foaf:family_name "Hacker" .
> 
> _:b    foaf:firstname   "Bob" .
> _:b    foaf:surname     "Hacker" .
> 
> PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
> PREFIX vcard:   <http://www.w3.org/2001/vcard-rdf/3.0#>
> 
> CONSTRUCT   ( ?x vcard:N _:a )
>             ( _:n vcard:givenName  ?gname )
>             ( _:n vcard:familyName ?fname )
> WHERE
>        { ( ?x foaf:firstname ?gname ) OR (?x foaf:givenname   ?gname ) }
>        { ( ?x foaf:surname   ?fname ) OR (?x foaf:familt_name ?fname ) }
>             
> 
> creates vcard properties corresponding to the FOAF information:
> 
> (KW Comment: the notation { ... } is not explained, I think.)

Used the nested patterns and in the alternatives sections.

> 
> 
>       10.3 Descriptions of Resources
> 
> ...
> 
> 
>       10.4 Asking "yes or no" questions
> 
> ...
> 
> (KW Comment: It is not clear what value is returned by an Ask query 
> form. One would hope it is a boolean. This might enable nested query 
> forms in the future. But, it appears to be a plain literal, "yes" or 
> "no". why not make it a boolean-typed literal?)
> 
> ...
> 

It's noted that it's awaiting protocol and/or results documents to put in a 
better text.

Committed version 1.145

Thanks for all effort put into the comments,

	Andy

Received on Friday, 3 December 2004 15:33:47 UTC