[sc34wg3] TMQL: Navigation step and the optional anchor

Robert Barta rho at devc.at
Mon Feb 23 14:50:03 EST 2009


On Thu, Dec 04, 2008 at 02:20:45PM +0100, Lars Heuer wrote:
> I think I've brought this already up but I cannot find the reference
> yet: All navigation steps accept an optional anchor, but the optional
> anchor isn't considered for all navigation steps.

That is correct.

> Here a table that shows if the optional anchor is actually considered
> in an expression or not:

[...]

> Only three axes from 14 use the optional anchor at all! I find it
> strange that all axes must accept an optional anchor even if the
> common case is that the anchor is not evaluated. From my point of
> view it would be much better if the few (3) axes accept the anchor
> and the other (11) axes do not accept an anchor at all.

If you follow the definition of axes[1] then you will notice the
uniform look all movements through the map have. So the first benefit
is a simpler parsing structure, also in the light that, say CTM[2] has
70 rules and TMQL 58 (albeit with 30 shortcuts).

But there is a deeper reasoning behind it.

1) It is my strong belief that the axes themselves do NOT belong into
   TMQL itself. Actually 4.4. is the ONLY section where there is a
   dependency on TMDM. So the only syntactic commitment is the structure

       ( '>>' | '<<' ) axis [ anchor ]

   That is the minimal way to make TMDM work. When - in the future -
   the definition of axes moves out of TMQL (why should a _query_
   language say something about axes of an underlying data model???),
   then the general structure may be the only thing to remain.

2) And once we are there, we can use this structure to query TMRM. There
   the anchor might _always_ be necessary, regardless of the navigation
   axes. Did not think this through.

3) And once we are there, we can use this structure also to query
   RDF. That is left as exercise to the reader (I just love this
   part!) :-)

[1] http://kill.devc.at/system/files/tmql-2008-07-15.html#Navigation
[2] http://kill.devc.at/system/files/0880rev.htm

\rho


More information about the sc34wg3 mailing list