Re: sparqlx

Kendall Clark wrote:
> Folks,
> 
> Attached is a zip file of SPARQL queries in XML and a schema (which is
> induced from the queries, and thus not entirely complete -- but close
> enough for discussion, I think).
> 
> It's missing two things:
> 
> 1. ORDER BY
> 
> 2. serialization for arbitrary expressions (in constraints) --
>    treating them as opaque strings is easier but less useful. I think
>    it's the wrong thing to do. XQueryX is the model here, but I
>    haven't gotten to it yet.
> 
> (Thanks to Bijan and Bryan for comments about and help with some of
> this.)
> 
> Kendall Clark

Kendall,

I had a quick scan (and will look more later).   2 (related) comments:

1/ the handling of optional by an attribute. It seem more systematic to define a 
tag c.f.:

    <optional>
       <pattern-group>
          <triple-pattern>
          ....

    <union>
       <pattern-group>
          <triple-pattern>
          ...

    <namedgraph>
       <pattern-group>
          <triple-pattern>
           ...

2/ Basic patterns and triple patterns

Something like { ?s ?p ?o } can be viewed as a single triple pattern or it can 
be a single triple pattern in a group.  Old syntax used to have difference 
between these two cases - new syntax only has group and lists of triples.

The view as group-triples makes more sense to me because of the extension to { 
?s ?p ?o . ?a ?b ?c . } - that is a group of two triple patterns (a basic pattern).

If pattern-groups are the only thing that can have triple patterns then there is 
no need for a schema to have to cope with triple pattern or group at each point.

pattern-groups also hold constriants, optional, GRAPHs.

I think this is close to the examples - a bit further away from the schema with 
it's tpattern and gpattern.

It does introduce an extra level of XML but it makes it much easier to process 
because of the regularity.  In compensation, it loses an atrribute and makes the 
schema simpler (less variability).

The top of query is always a pattern-group (like the {} round a query pattern in 
the human syntax).


 Andy

Received on Tuesday, 22 March 2005 18:07:02 UTC