- From: Seaborne, Andy <andy.seaborne@hp.com>
- Date: Fri, 05 Aug 2005 16:45:32 +0100
- To: kendall@monkeyfist.com
- CC: DAWG Mailing List <public-rdf-dawg@w3.org>
Kendall Clark wrote: > Dogs, > > I know I should be working on the protocol stuff (and I am), but I want to > suggest some small, clarificatory changes to the language on CONSTRUCT. The > way the language reads right now > > The CONSTRUCT result form returns a single RDF graph specified by a graph > template. The result is an RDF graph formed by taking each query solution > in the solution sequence, substituting for the variables into the graph > template and combining the triples into a single RDF graph by set union. > > This is admirably clear, and I have no problem with it. However, it doesn't > say anything about ground triples in the graph template and, thus, in the > result graph created by CONSTRUCT. I've spoken with Andy about this, and we > agree that the spec doesn't say anything to contract ground triples in the > graph template. > > However, it doesn't say anything explicitly about this capability, which I > think is pretty useful. I'd like an example that focuses on this, so I'm > contributing the following text that I'd like to see put into rq23: > > The graph template may also contain ground or explicit triples, that is, > triples with no variables, and these also appear in the RDF graph returned > by the CONSTRUCT query form. Thanks for the text - I belive the definition of template covers this because it refers to triple patterns which do not need to have variables but if adding the text makes it cleaer, I can do. > > I think it would fit nicely as the last sentence of this paragraph (from 10.3): > > If any such instantiation produces a triple containing an unbound > variable, or an illegal RDF construct (such as a literal in subject or > predicate position), then that triple is not included in the RDF graph, > and a warning may be generated. > > The first example in 10.3 can be modified thus to illustrate the ground > triple capability: > > @prefix foaf: <http://xmlns.com/foaf/0.1/> . > > _:a foaf:name "Alice" . > _:a foaf:mbox <mailto:alice@example.org> . > > PREFIX foaf: <http://xmlns.com/foaf/0.1/> > PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> > CONSTRUCT { <http://example.org/person#Alice> vcard:FN ?name; > <http://exampl.org/persona#Ted> vcard:FN "Ted"^^en-us} > WHERE { ?x foaf:name ?name } > > creates vcard properties from the FOAF information: > > @prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> . > <http://example.org/person#Alice> vcard:FN "Alice" . > <http://example.org/person#Ted> vcard:FN "Ted"^^en-us . Not convinced by this example : firstly, the query pattern is about finding names and adding a fixed one is a bit confusing. Secondly, first examplkes shouldn't be too overloaded. I choose vcard out because, for a simple first example, I didn't want any blank node on output issues. If vcard had an RDFS class, it could introduce that but there isn't one in the vocabulary. How about writing this up as a test case instead? It could be a "real worlkd" example based on your full RSS usage and the needs of a simple first example don't apply. Andy > > One of my use cases for CONSTRUCT is to be able to create URIs which are > standing queries, the output of which is an RSS 1.0 channel, or some other > well-known RDF file, say, FOAF. Having ground triples in the graph template > is crucial. I'd just like the spec to be more explicit about this capability. > > Cheers, > Kendall >
Received on Friday, 5 August 2005 15:46:47 UTC