Vocabulary for result sets

At the F2F, I offered to write a vocabulary for result sets.  While I had in
mind query result sets for queries evaluating to variable bindings, it
occurred to me that it is the same as providing reasons for pattern-trigger
rules.  This vocabulary does not cover the case of query languages that
return one or more subgraphs of the target graph.

Attached are:

1/ result-set-vocab.n3  - the vocabulary in N3
2/ result-set-vocab.xml - the same in XML: machine produced and neatened
3/ result-set-ex1.n3    - example in N3
4/ result-set-ex1.xml   - same example in XML (but no type info)
5/ result-set-ex2.n3    - same bindings in N3 without type decoration,
                          possibly easier to read

Example: result-set-ex2.n3, which shows it can be layed out so people can
see the structure.  Sort of.

------------------------------------------------------------
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rdf:    <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dc:     <http://purl.org/dc/elements/1.1/> .
@prefix q:      <http://somewhere/2003/01/result-set-vocab#> .
@prefix xsd:    <http://www.w3.org/2000/10/XMLSchema#> .


<>  q:size "2"^^xsd:integer ;				# Some information
for convenience
    q:hasVariable "x" ; q:hasVariable "y" ;     # Some information for
convenience
    q:hasSolution
        [ q:hasBinding [ q:variable "x" ; q:value "123"^^xsd:integer ] ;
          q:hasBinding [ q:variable "y" ; q:value
<http://example.com/resource1> ]
        ] ;

    q:hasSolution
        [ q:hasBinding [ q:variable "x" ; q:value "2003-01-21" ] ;
          q:hasBinding [ q:variable "y" ; q:value
<http://example.com/resource2> ]
        ] ;
    .
------------------------------------------------------------

(1) I used multiple occurrences of a property/value, rather than use a bag,
for the solutions (rows) in a result set (table) and for the bindings in a
solution

(2) I used a struct-like encoding , rather DAML lists / RDF collections, or
a bag, for the bindings.  What is good style for this sort of thing?

Comments please,

	Andy

Received on Thursday, 23 January 2003 14:25:28 UTC