[Versa] DOT

Michael Olson Mike.Olson at fourthought.com
Mon Sep 26 21:03:12 MDT 2005


I had a thought that I think would prove useful WRT dots in expressions.

Currently, you can do

all() - ns:age -> . < 18

and "." is replaced with the current object of each statement that  
matches the subject and predicate patterns

Now, with first class statement datatypes, do we want to allow access  
to the statement.  I guess what I envision is a dot path that allows  
access to more objects through a "dot-stack"

Here are some examples

all() - * -> ft:statement-uri(./..) == "http://foo.com"

The "./.." would be the parent "dot" which would be set to the  
statement itself during a traversal.  In this case, a made up function  
call would use the statement object to get its URI and return it.

or

all() - (./../.. |- rdf:type -> owl:ObjectProperty) -> *

In this, the dot path would represent "the predicate of the statement  
being evaluated in the outer traversal".  Or, the first "." would be  
the subject of the inner filter, then the first ".." would be the  
statement of the inner filter, and finally the next ".." would be the  
predicate of the outer traversal

The first use case I see as much more useful.  Especially when you  
start doing logic based on other pieces of the statement at different  
locations of a traversal.  Ex,

all() |- *:age -> (predicate(./..) == ns1:age & . == "fifteen") |  
(predicate(./..) == ns2:age & . == 15)



Mike

------------------------------------------------------------------------ 
-----------------
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