Re: Negation in the different TMQL candidates
Lars Marius Garshol <[email protected]> Wed, 31 Mar 2004 13:52:05 +0200
| Newsgroups | gmane.text.xml.xtm.tmql |
|---|---|
| Message-ID | <[email protected]> |
* Rani Pinchuk | | Till here it is quite clear. The question is how the negation of the | above will work. In toma the following: | | select $player, %is-author where is-author->author != $player; | | Could give: | | $player | %is-author | ------------+------------ | bla | 1 | bla | 2 | | Because the topic 'bla' indeed doesn't play the author role in an | association of type is-author. But actually the more correct result | is: | | | $player | %is-author | ------------+------------ | steve-pepper| 2 | holger-rath | 1 | bla | 1 | bla | 2 It's not clear what this query does, actually. Where do the $player values come from? As far as I can see, Toma doesn't say, and that's why your query is ambiguous. It's also hard to see how you could read this query in English. | I know that in tolog for example, the negation is like a filter - so | it removes ALL the matches in the association. Correct. | But I wonder if/how it is possible to have the second possibility in | tolog. Basically, in order to have negation there has to be (implicitly or explicitly) a set of potential candidates on which the negation is tested. Negation-as-filter solves this by saying "You have to give me the list of candidates, or I won't do anything". The alternative is to create rules for what the list of candidates is in each situation. That may work, but isn't at all natural in tolog. I'll leave to Dmitry and Robert to answer for TMPath and AsTMa?. -- Lars Marius Garshol, Ontopian <URL: http://www.ontopia.net > GSM: +47 98 21 55 50 <URL: http://www.garshol.priv.no >