[Versa] Issue 100A proposal, extension functions

Chimezie Ogbuji chimezie at gmail.com
Sun Sep 4 04:40:31 MDT 2005


Attached is the same spec draft with section 7.7 added:

7.7. Function Names and Extensions

7.7.1. Function Name Expansion

All function names are Qnames as given by 'Namespaces in XML.'   
Qnames are all expanded the same way by the implementation.  
References to unbound namespace prefixes should always raise the same
error (for variables, node queries, and function names) indicating to
the user that the prefix used is unbound.

The following namespaces prefix to URI bindings should be registered by default:

rdfs    http://www.w3.org/2000/01/rdf-schema#
rdf     http://www.w3.org/1999/02/22-rdf-syntax-ns#
dc      http://purl.org/dc/elements/1.1/
xs      http://www.w3.org/2001/XMLSchema#
owl    http://www.w3.org/2002/07/owl#
vtrav  http://rdfinference.org/versa/0/2/traverse/ 
versa http://rdfinference.org/versa/0/2/ 

The default namespace is http://rdfinference.org/versa/0/2/ and all
functions in the core library are bound to this namespace.

7.6.2. Function Name Resolution / Invokation

The Versa query processor is expected to resolve Qname function
references in the following way:

1.First, the fully expanded URI is used to as a key to determine if
the function referenced is registered with the implementaion.
2.If so, invoke the registered function with the given arguments.
3.If there is no such entry registered with the implementation and no
arguments are given, raise an error indicating an illegal function
invocation.
4.If there is no such entry registered with the implementation but one
or more arguments are provided, attempt to interpret the function
invocation as a First Order Predicate with the set of function
arguments used as a unary term:
5.Match all statements where the subject is any of the arguments given
(after being converted to resources) and the predicate is the fully
expanded URI given by the function name
6.Return the objects of all such statements

ns:functionName(arg1,arg2,..,argN)  :=  set(res1,res2,..,resN) –
ns:functionName -> *
Where resN is argN converted to a resource using the conversion rules.

7.6.3. Versa Extensions Functions

The implementation is solely responsible for providing a mechanism for
registering functions to namespaces.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fourthought.com/pipermail/versa/attachments/20050904/7d24da1b/Versa.html


More information about the Versa mailing list