[Versa] Versa issue: subgraph primitives?
Chimezie Ogbuji
chimezie at gmail.com
Thu Sep 8 21:16:53 MDT 2005
> { type(rss:item) - rss:title -> contains('4Suite') } . - dc:creator -> *
>
> or
>
> { type(rss:item) |- rss:title -> contains('4Suite') } . - dc:creator -> *
Whoops, the use of '.' to refer to the context bound to the scoped
query doesn't seem right. I'd probably want:
{ type(rss:item) |- rss:title -> contains('4Suite') } [ - dc:creator -> *]
or
{ type(rss:item) |- rss:title -> contains('4Suite') } all() - dc:creator -> *
Since, '.' refers to the context 'node' (as of the current
specification). In this case, the 'context node' as it was defined
before is actually a list of statements (in the new sense), so it
doesn't seem to make sense in the first slot of a traversal expression
- which expects a list of 'resources' (not statements) to match
statement subjects against.
That's probably not clear, but basically, introducing a context (a
named list of statements) as a first class object means you have to
account for every possible place it could be used in the grammar.
And just for the record. I'm pretty sure (at least in the RDBMS
implementation of a context-aware RDF store) that
{ type(rss:item) |- rss:title -> contains('4Suite') } all() - dc:creator -> *
would be more efficient to execute than
(type(rss:item) |- rss:title -> contains('4Suite')) - dc:creator -> *
Especially in scenarios where the query is executed *across* the model
instead of within a named graph. Since, in the first scenario, the
query processor knows it can further restrain fetches from the RDF
store for the scoped query (2) by the name(s) of the graph(s) that the
statements from the results of evaluating the context expression (1)
belong in.
{ type(rss:item) |- rss:title -> contains('4Suite') } all() - dc:creator -> *
(1)
(2)
More information about the Versa
mailing list