[Versa] Question about query
Michael Olson
Mike.Olson at fourthought.com
Sun Sep 4 13:25:58 MDT 2005
>>
>> If we don't want it to be query, but a "pattern", then we would have
>> to change the spec so the above two queries are not valid as top level
>> queries, but only valid in filter, traverse, and function calls.
>>
>>
>> As I said in a previous email, it is on my "need" list to support
>> these
>> queries. If we remove them, then I will have to use an extension
>> function.
>
>
> I don't think you would need an extension function to do "'foo'" to
> return all strings in the model that are 'foo', you could do:
>
> filter(type(xsd:string),"contains('foo')")
>
Sure, and with support for literal based functions, I could find all
foos with a certain data type, or language.
It will just be a lot quicker (implementation wise) to do this as a ext
function.
> I think of resource patterns as different from literals (resource
> patterns are names for resources you are matching against in the graph
> or the name of a resource resulting from evaluating an expression,
> while a literal is an actual literal value in the query processor
> space) and I don't really see the need for a literal pattern, since
> you have string comparison functions to filter on literals in the
> model (which you can reach directly with type(xsd:*)
>
> So
>
> resource-query ::= node-query
> node-query ::= uri-query | qname-query
> uri-query ::= uriref
>
> type(xsd:*) covers most of what you would need from a literal-query
I'm OK with this (though I would get rid of resource-query all
together).
My question is still, should a resource-query even exist? or is a top
level versa query basically a filter, traversal, variable reference or
function call?
Mike
> _______________________________________________
> Versa mailing list
> Versa at lists.fourthought.com
> http://lists.fourthought.com/mailman/listinfo/versa
>
------------------------------------------------------------------------
-----------------
Mike Olson Principal
Consultant
mike.olson at fourthought.com +1 720 253 4662
Fourthought, Inc.
http://Fourthought.com
PO Box 270590, http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management
More information about the Versa
mailing list