- From: Seaborne, Andy <andy.seaborne@hp.com>
- Date: Mon, 13 Jun 2005 12:53:44 +0100
- To: kendall@monkeyfist.com, DAWG Mailing List <public-rdf-dawg@w3.org>
Sections 7, 8, 9, 10
cc: www-archive removed. This list is archived.
(This is the last reply to the comments message)
Comments accepted unless noted below:
See CVS log for things accepted that aren't purely editorial.
Latest is v1.389
Andy
Kendall Clark wrote:
> Andy & Eric,
>
> I'm attaching my review of 1.377 of rq23. It's an annotated copy of the spec
> itself. That seemed a bit easier for me and, hopefully, for you guys to
> process. I'm hoping that the W3 list archiver turns HTML attachments into
> links.
>
> Anyway, I'm happy to discuss any of the comments in the review. FYI, I
> stopped the review around section 11.1. I made nearly 300 <strike> or <ins>
> annotations, and then I got really tired of doing that. :>
>
> All in all, good show on the spec!
>
> Kendall Clark
>
>
> ------------------------------------------------------------------------
>
> W3C <http://www.w3.org/>
>
>
> SPARQL Query Language for RDF
...
> 7 RDF Dataset
>
> The RDF data model expresses information as graphs, comprising of
> triples with subject, predicate and object. Many RDF data stores hold
> multiple RDF graphs,graphs and record information about each graph,
> allowing an application to make queries that involve information from
> more than one graph.
Left as is.
>
> A SPARQL query is madeexecuted against an /RDF Dataset/ which may
> represents such a collection of graphs [Is one graph "such a collection
> of graphs"?].
Yes. (As is zero)
> Different parts of the query are may be matched against
> different graphs as described in the next section <#queryDataset>. There
> is one graph, the default graph, which does not have a name, and zero or
> more named graphs, each identified by IRI.
>
> *Definition:* RDF Dataset
>
> An RDF dataset is a set
> { G, (<u_1 >, G_1 ), (<u_2 >, G_2 ), . . . (<u_n >, G_n ) }
> where G and each G_i are graphs, and each <u_i > is a IRI. Each <u_i >
> is distinct.
>
> G is called the default graph. (<u_1 >, G_i ) are called named graphs.
>
> In the previous sections, all queries have been shown executed against a
> single, default graph. A query does not need to involvebe executed
> against the default graph; the query can just involvemay be executed
> against the named graphs. [Has this been synched up with the design of
> fromUnionQuery we decided on Tuesday? I'm not sure it's consistent with
> that design.]
Could you provide an example where it's not consistent?
>
> @@Need not have a default graph.
>
>
> 7.1 Examples of RDF Datasets
. . .
>
> In this example, the default graph contains the publisher names of two
> named graphs [I don't know what is meant by "the publisher names of two
> named graphs"...].
"the names of the publishers of two named graphs"
(the graph has predciate dc:publisher)
> The triples in the named graphs are not visible in
> the default graphand, thought of as the default knowledge base, the
> application is not directly trusting the information in the named graphs.
>
>
. . .
>
> [I see very little value in this section. I won't request, at this
> stage, that it be struck entirely, but I think it's a good idea. At the
> very least, there are three or four problematic sentences or phrases
> that need to be reworked or struck.]
>
>
> 8 Querying the Dataset
>
. . .
>
> 9 Specifying RDF Datasets
>
> A SPARQL query may specify the dataset against which it is to be
> executed for the query.
"A SPARQL query may specify the dataset to be used for matching."
. . .
>
> @@Add text to say that specifying the dataset overrides an service dataset.
>
> @@ Text from DanC:
Text added (with edits)
>
> The FROM and FROM NAMED keywords allow a query to specify an RDF dataset
> by reference; they indicate that the dataset should include graphs that
> are obtained from representations of the resources identified by the
> given IRIs (i.e. the absolute form of the given IRI references). The
> dataset resulting from a number of FROM and FROM NAMED clauses is
> - a default graph consisting of the merge of the graphs referred to in
> the FROM clauses
> - a set of (IRI, graph) pairs, one from each FROM NAMED clause.
>
>
> 9.1 Specifying the Default Graph
>
. . .
> @@Text from DanC:
>
> NOTE: The "FROM NAMED" syntax suggests that the IRI identifies the
> corresponding graph, but actually the relationship between a URI and a
> graph in an RDF dataset is indirect: the IRI identifies a resource, and
> the resource is represented by a graph (or, more precisely: by a
> document that serializes a graph). See also the diagram in section "1.
> Introduction" of [webarch].
>
> http://www.w3.org/TR/webarch/#intro
Text added (with edits)
. . .
>
> 10 Query Result Forms
>
> SPARQL has a number offour query formsresult forms for returning
> results. These resultquery
left second.
> forms use the solutions from pattern matching
> to form result sets or RDF graphs. The query forms are:
>
> SELECT <#select>
> Returns all, or a subset of, the variables bound in a query
> pattern match.
> CONSTRUCT <#construct>
> Returns an RDF graph constructed by substituting variables in a
> set of triple templates.
> DESCRIBE <#describe>
> Returns an RDF graph that describes the resources found.
> ASK <#ask>
> Returns a boolean indicating whether a query pattern matches or not.
>
> The SPARQL Variable Binding Results XML Format
> <http://www.w3.org/TR/rdf-sparql-XMLres/> can be used to serialize
> result sets from a |SELECT| query or the boolean result of an |ASK| query.
>
>
> 10.1 Solution Sequences and Result Forms
>
> Query patterns generate a set of solutions, each solution being a
> function from variables to RDF terms. These solutions are treated as a
> sequence. A number of sequence modifiers are [I think "may be" might be
> better than "are" here?] applied before the solutions are used to form
> the final query result.
"Any sequence modifiers are applied ..."
They are not optional.
>
> *Definition:* Solution Sequence
>
. . .
>
>
> OFFSET
>
> |OFFSET| causes the solutions generated to start after the specified
> number of solutions. An |OFFSET| of zero has no effect.
>
> The order in which solutions are returned is initially undefined; thus
> so using |LIMIT| and |OFFSET| to select different subsets of the query
> solutions will given not be useful unless the order is made predictable
> by ensuring ordered results using | ORDER BY|.
Left as is.
>
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
>
> SELECT ?name
> WHERE { ?x foaf:name ?name }
> ORDER BY ?name
> LIMIT 5
> OFFSET 10
>
> *Definition:* Offset Solution Sequence
>
> An Offset Solution Sequence with respect to another solution sequence S,
> is one which starts at a given index of S.
>
> For solution sequence S = (S_1 , S_2 , . . . , S_n ), the offset
> solution sequence
> offset(S, k), k >= 0 is
> (Sk, Sk+1, . . ., S_n ) if n >= k
> (), the empty sequence, if k > n
>
>
> 10.2 Selecting Variables
>
> The SELECT form of results returns the variables directly. The syntax
> |SELECT *| is shorthand for an abbreviation "select all the named
> variables"that selects all of the named variables.
>
> @prefix foaf: <http://xmlns.com/foaf/0.1/> .
>
> _:a foaf:name "Alice" .
> _:a foaf:knows _:b .
> _:a foaf:knows _:c .
>
> _:b foaf:name "Bob" .
>
> _:c foaf:name "Clare" .
> _:c foaf:nick "CT" .
>
>
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> SELECT ?nameX ?nameY ?nickY
> WHERE
> { ?x foaf:knows ?y ;
> foaf:name ?nameX .
> ?y foaf:name ?nameY .
> OPTIONAL { ?y foaf:nick ?nickY }
> }
>
> nameX nameY nickY
> "Alice" "Bob"
> "Alice" "Clare" "CT"
>
> Results can be thought of as a table or result set, with one row per
> query solution. Some cells may be empty because a variable is not bound
> in that particular solution.
>
> Result sets can be accessed by the local API but also can be serialized
> into either XML or an RDF graph[I request this be removed, as there is
> no other mention of this anywhere in our specs, nor is there any
> specification of what this RDF graph might look like.].
Done (the testing does describe the vocabulary).
The Query
> Results XML Format <http://www.w3.org/TR/rdf-sparql-XMLres/> [Use the
> full form of the title here]form of this result set gives:
. . .
>
> 10.3 Constructing an Output Graph
>
. . .
>
> The use of variable ?x in the template, which in this example will be
> bound to blank nodes (which have labels |_:a| and |_:b| in the data) and
> cause different blank node labels (|_:v1| and |_:v2|) as shown by the
> results.[As written, this is a sentence fragment or incomplete sentence.
> It's missing a main verb. Not sure about replacement text because I'm
> not sure what was intended.]
>
>
> Accessing Graphs in the RDF Dataset
>
...
>
> where |app:myDate| identifiedindentifies an extension function
???indentifies?
> <#extensionFunctions> to turn the data format into an |xsd:dateTime| RDF
> Term.
>
. . .
>
>
> 10.4 Descriptions of Resources
>
> The |DESCRIBE| form returns a single result RDF graph containing RDF
> data about resources. This data is not prescribed by a SPARQL query,
> where the query client would need to know the structure of the RDF in
> the data source, but, instead, is determined by the SPARQL query processor.
>
> The query pattern is used to create a result set. The | DESCRIBE| form
> takes each of the resources identified in a solution, together with any
> resources directly named by IRI, and assembles a single RDF graph by
> taking a "description" from the target knowledge base. The description
> is determined by the query processor implementation and should provide a
> useful description of the resource, where the meaning of"useful" is left
> to nature of the information in the data sourcedetermined by the query
> processor, the knowledge base, or other domain-specific information.
"""
where the meaning of "useful" is determined by the information publisher.
"""
>
> If a data source,source has no information about a resource, no RDF
> triples are added to the result graph but the query does not fail.
>
. . .
>
> 10.5 Asking "yes or no" boolean questions
Left. "Boolean valued" questions seems more correct but unhelpful.
>
> Applications can use the |ASK| form to test whether or not a query
> pattern has a solution. No information is returned about the possible
> query solutions, just whether the server can find one or not.
>
> @prefix foaf: <http://xmlns.com/foaf/0.1/> .
> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
> @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
>
> _:a foaf:name "Alice" .
> _:a foaf:homepage <http://work.example.org/alice/> .
>
> _:b foaf:name "Bob" .
> _:b foaf:mbox <mailto:bob@work.example> .
>
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> ASK { ?x foaf:name "Alice" }
>
> yes
>
> The Query Results XML Format <http://www.w3.org/TR/rdf-sparql-XMLres/>
> [Full form of title...]form of this result set gives:
>
> <?xml version="1.0"?>
> <sparql xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result2">
> <head></head>
> <results>
> <boolean>true</boolean>
> </results>
> </sparql>
>
> On the same data, the following returns no match because Alice's |mbox|
> is not mentioned.
>
> PREFIX foaf: <http://xmlns.com/foaf/0.1/>
> ASK { ?x foaf:name "Alice" ;
> foaf:mbox <mailto:alice@work.example> }
>
> no
>
> *Definition:* ASK
>
> Let Q = (GP, DS, SM, ASK) where
>
> * GP is a graph pattern <#defn_GraphPattern>
> * DS is an RDF Dataset <#defn_RDFDataset>
> * SM is a set of solution modifiers <#defn_SolutionSequenceModifier>
>
> and QS is the set of solution formed by matching dataset DS with graph
> pattern GP then the ASK result is true if SM(QS) is not empty, otherwise
> it is false.
Received on Monday, 13 June 2005 11:57:33 UTC