[sc34wg3] TMQL: Scope and tuple sequences
Lars Heuer
heuer at semagia.com
Fri Nov 9 08:29:16 EST 2007
Hi,
TMQL seems to support lists / scope not very well
[O] boolean-primitive ::= @ anchor
==> . @ == anchor
(==> . >> scope == anchor)
'anchor' is always a singleton (either a variable, a literal, or
item reference), but scope consists of several themes (topics).
While it might be okay to allow just a singleton for the shortcut above,
it seems that TMQL does not support multiple themes at all.
The following query seems to be invalid:
(a) john-lennon / homepage[@en, private]
and the expanded form also:
(b) john-lennon / homepage[. >> scope == (en, private)]
I think (b) should be supported by TMQL and it would also be valueable
to support (a).
But (b) leads me to another question...
To my knowledge neither TMDM nor TMRM nor the TMDM->TMRM
implies any ordering (i.e. for scope).
My conclusion of this mismatch is, that the following query may
produce an empty sequence:
//person == //person
Since we have no ordering, the left hand side may, for example, produce
(lennon, mccartney)
while the right hand side may produce
(mccartney, lennon)
And therefor the "==" operation returns an empty sequence.
If this assumption holds true, query (b) may or may not produce a non
empty sequence (depends on the ordering of the sequence produced by
the scope axis), which is not very intuitive.
To make the query work in all cases, a user has to modify the query as
follows:
john-lennon / homepage[@en & @private)]
Best regards,
Lars
--
http://www.semagia.com
More information about the sc34wg3
mailing list