W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2005

clearing up CONSTRUCT's capabilities

From: Kendall Clark <kendall@monkeyfist.com>
Date: Thu, 4 Aug 2005 10:31:56 -0400
To: DAWG Mailing List <public-rdf-dawg@w3.org>
Message-ID: <20050804143156.GI30749@monkeyfist.com>

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.
  
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 .

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 Thursday, 4 August 2005 14:34:03 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:24 GMT