[tmql-wg] Negation in the different TMQL candidates

Dmitry dmitryv@cogeco.ca
Wed, 31 Mar 2004 20:49:11 -0500

On Mar 31, 2004, at 9:24 AM, Rani Pinchuk wrote:

>> TMPath has default "existence"  quantification in "=" and "!="
>> operators.  Both operators are applied to sequences which are already
>> "generated" by TMPath expressions.
>> "!=" is true if there is at least one element in left sequence and at
>> least one in right sequence which are not equal
>> TMPath has also explicit "every $X in ... satisfies ..."  and "some $X
>> in .... satisfies ..." expressions.
>> In some cases FLOR expressions are used to provide equivalent of SQL
>> left joins
> Hi Dmitry,
> I am not sure I understand from the above how your query works:
> list{
>   for $Person in 
> /topic[person;not(roleOf::author[is-author-of]/role::opus)]
>   return $Person/bn::*[1]
> }
> I read it as follows:
> For each $Person which is of type 'person', and does not play the role
> 'author' in an association of type 'is-author-of'...
> But where it states that it doesn't play in ANY association of that 
> type
> in that role? Or this is the default behavior in TMPath?

That's default behavior. TMPath favors existential queries

> I suspect that the following query might be useful for me to understand
> how TMPath does things:
> How can you show all the topics that play in an association with the
> association type next to it? In Toma it is:
> select $player, $association where $association->$role = $player;

Using FLOR expression:

for $A in /a[*]
for $Player in $A/roleof::*
return ($Player,$A/type)