[Versa] DOT
Michael Olson
Mike.Olson at fourthought.com
Tue Sep 27 11:26:55 MDT 2005
> It's strange that the meaning of this dot path stuff is based on a
> temporary nesting of intermediate contexts rather than something in the
> underlying model. I think this blows the XPath and UNIX file system
> comparison and makes this really hard to intuitively understand.
>
> I would prefer to have a special, named variable set up to represent
> the
> statement
>
> all() - * -> ft:statement-uri($versa:current-statement) ==
> "http://foo.com"
>
I think I like this better. we define (smaller names to cut down on
typing)
$versa:statement
$versa:subject
$versa:predicate
$versa:object
The last three are shortcuts onto the first.
Then "." is defined as the appropriate value from the last three
variables
Mike
>> 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
>
> Hmm. Even with your explanation this takes me a lot of squinting to
> grok.
>
> I'd personally end to break such a query down by composition, even if I
> had this dot trick available.
>
>> 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)
>
> Ditto above statement. Seems a pretty heavy syntactic/conceptual load
> to give such an atypical use-case (again I think I'd prefer to use
> query
> composition in such cases even if the above syntax were legal).
>
>
> --
> 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