[tmql-wg] Result set requirements

Robert Barta rho@bigpond.net.au
Fri, 27 Feb 2004 09:23:48 +1000


On Mon, Feb 23, 2004 at 09:26:21PM -0500, Dmitry wrote:
> I am not sure about Toma and AsTMa but in TMPath I have special 
> 'shortcuts' which help to get and return values.

You mean 'string' values (in contrast to node values), I guess?

> If I need base name node I use:
> 
> $topic/bn[<name type>] or just $topic/bn
> 
> If I need value I use $topic/bn::<name type> or $topic/bn::*

Aren't we talking here about 'stringification' of nodes? If so,
then this could be solved, as above, with a postfix. It could be
solved with a function:

   string($topic/bn)     # this returns a string

It could be solved contextual, so in a node context I get nodes:

  $topic/roleOf[who]/association[born-in]/role[where]/topic[city]
       ^           ^
       |           |  ....

    all nodes

  my string $s = $topic/roleOf[who] # get a string here, because I wanted one

> Shortcuts are used when I know types of names, occurrences, roles
> and associations and I am interested in "values".

But you have to "know" it. The language could know that for you as
it knows in which context you are using something. This is like XPath

    //chapter[title = "Hell Freezes Over"]

where the 'title' node is converted to string for the comparison to
happen.

> I think that "full" result sets such as XML, TopicMaps/fragments and 
> tables can be reasonably easy integrated with host environment.
> XML->DOM or SAX
> Topicmap -> TMAPI based set of classes
> tuple streams -> lists or streams or cursors

Yes, ...

> I am not so sure about partial results such as list of base names. 

...do you now have problems with 'base name strings' or 'base name
nodes'?

\rho