RE: XSRQL proposal

-------- Original Message --------
> From: Howard Katz <mailto:howardk@fatdog.com>
> Date: 29 June 2004 00:20
> 
> > -----Original Message-----
> > From: public-rdf-dawg-request@w3.org
> > [mailto:public-rdf-dawg-request@w3.org]On Behalf Of Seaborne, Andy
> > Sent: Monday, June 28, 2004 2:18 PM
> > To: 'Howard Katz'; public-rdf-dawg@w3.org
> > Subject: RE: XSRQL proposal
> > 
 . . . .
> > 
> > 3/ The data model has subjects, predicates and objects and the syntax
> > uses cues to indicate what is a predicate using @.  How do I write a
> > query that does 
> > 
> > (?x ?x anything)
> 
> I'm assuming that your "anything" might also be called "something" --
> ie, 
> it's *not* a variable but an actual specific object. If that's correct
> (is 
> it?), then you'd say:
> 
>    { *, @*, anything }
> 
> and would get back all triples that terminate in an "anything" object.

I am interested in both cases - anything as a vraible or anythign a a preset
value.  I'm trying to understand how the graph labels (on nodes and on arcs)
interact in XsRQL and also the type system og subject/predicates/objects
rather than graph labels.

>    { *, @*, anything }

Does this ensure that the subject and the predicate slot have the same
URIref?  In (?x ?x ?z) both the ?x's must be bound to the same graph label
so it does match: 

  rdf:type rdf:type rdf:Property .


Based on the example with 
{ $afghanistan, $afghanistan/@*, $afghanistan/@*/* }

I think I need a named variable to make them the same:

Would I have to do (sorry for murdering the synatx):
If the object is a fixed value:

for $s in subject()
  for $p in predicate()
   where $s = $p
   for $o in object() [someValue]
     { $s , $p , $o }

or for a variable object, and different way to write the $p condition:

for $s in subject()
  for $p in */@$s
   for $o in object()
    { $p , $p , $o }       Not sure about $p in the subject slot/.

- - - - - - -

Another example query would be:

(<x> ?p ?v)
(?p rdfs:range ?w)

?p must be the same in both triple patterns in any one solution of the
query.

	Andy

Received on Tuesday, 29 June 2004 05:18:10 UTC