Re: sparqlx

Kendall Clark wrote:
> On Tue, Mar 22, 2005 at 06:06:25PM +0000, Seaborne, Andy wrote:
> 
> 
>>I had a quick scan (and will look more later).   2 (related) comments:
> 
> 
> Thanks for looking, Andy.
> 
> 
>>1/ the handling of optional by an attribute. It seem more systematic to 
>>define a tag c.f.:
> 
> 
> Hmm, perhaps. The element v. attribute thing is endless, of course, I
> just thought that saying a thing is optional is an attribute of that
> thing, rather than something that relates one or things together,
> which is what a UNION is.
> 
> I think it's 12 of one, 15 of the other. -shrug-

OPTIONAL is a graph operator just like the others.  UNION could be done as an 
attribute.  It's just consistentcy.

> 
> 
>>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.  
> 
> 
> Yes, I struggled with understanding this bit of the SPARQL
> grammar. I'm not sure I favor one or the other ways of looking at it;
> in my view, the XML serialization should definitely be the tail and
> the end-user syntax should be the dog.

And they are both the tail of the defns in rq23 :-)

In rq23, triples patterns only play a role to basic patterns.  This is much more 
explciit in the new syntax than the old.

> 
> 
>>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).
> 
> 
> Right.
> 
> 
>>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.
> 
> 
> Sorry, I don't understand what you mean here.

Well - I'm assuming the examples are better guidance than the schema.  I found 
things in the schema which I didn't expect (prefixes - I think of them as merely 
part of shorthand for URIs - if you wish to round trip both syntaxes in a human 
readable way, then they migh tbe needed but for query meaning, they aren't) and 
things that weren't in examples (tpattern, 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).
> 
> 
> Loses the optional attribute you mean?
> 
> 
>>The top of query is always a pattern-group (like the {} round a query 
>>pattern in the human syntax).
> 
> 
> Yeah, this is definitely the part of the grammar I had the most
> trouble with (save for arbitrary expressions as constraints).
> 
> I'll rethink it again with yr comments in mind.
> 
> Kendall

In ARQ, there is a command line tool "qparse" that prints out query structure - 
the output type is "plain" or "debug".  I wrote that output format because in, 
old syntax, the variation in triple pattern vs graph patterns needed checking.

	Andy

Received on Wednesday, 23 March 2005 09:49:27 UTC