[Versa] function objects
Michael Olson
Mike.Olson at fourthought.com
Thu Sep 22 09:57:04 MDT 2005
> On Wed, 2005-09-21 at 19:58 -0600, Michael Olson wrote:
>> To revisit this, I like the idea, but syntactically I think we need a
>> symbol to differentiate these from a qname pattern. There is no
>> difference, from the grammars POV between
>>
>> ground(rdf:type)
>>
>> and
>>
>> map(ns:func_name)
>>
>> Maybe kinda C'ish and make it
>>
>> map (&ns:func_name)
>>
>> thoughts?
>
> I guess in my thinking of this as a simple function there was no need
> to
> distinguish between the argument to ground. The argument is just a
> resource URI, expressed literally, or in qname form. I would therefore
> expect to be able to do:
>
> ground(uri("http://" + "example" + ".org"))
>
> Assuming that we have a conversion function uri() in Versa 2.0 that can
> convert strings (and other data types?) to a URI.
>
> Short answer, I'd expect it to be
>
> ground(rdf:type)
>
> Maybe I'm missing something?
>
I guess I asked the question poorly. I'm OK with how ground works in
the example, what I think we need is a symbol to distinguish a
qname-pattern from a function-reference in the grammar because the
grammar cannot tell the difference between
rdf:type
which, as a writer of a query, probably means a qname pattern, and
versa:ground
which, as a writer of a query, most likely means a function-references.
What I propose is not change anything about the qname-pattern, but add
the symbol "&" to the front of function-references so the last example
would be
&versa:ground
Mike
>
> --
> Uche Ogbuji Fourthought, Inc.
> http://uche.ogbuji.net http://fourthought.com
> http://copia.ogbuji.net http://4Suite.org
> Articles: http://uche.ogbuji.net/tech/publications/
>
> _______________________________________________
> 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