[tmql-wg] aliases

Rani Pinchuk Rani.Pinchuk@spaceapplications.com
Sat, 21 Feb 2004 12:46:23 +0100


Hi all,

I would like to ask you about your opinion over an operator called
"alias" or "al" for short. The idea is that many topics might have
different basenames some in different scopes, but some are just 
aliases.

For example - "processor" is also "central processing unit" or
"cpu". 

Probably, all those strings will be located in the baseName node -
some as baseNameString and some as resourceData of a variant.

When looking for the processor topic, one might search it using 
other terms then 'processor'. If the query should define a search
in the baseName + the resourceData of the variants (of maybe more
then one level), the query can become quite big. Instead the alias
operator can be used as follows:

 select $topic where $topic.alias = 'cpu';

This query will look for all the topics that have baseNameString or
variant resourceData equal to 'cpu'. 

Of course the alias can be used with scope (over the basename node):

 select $topic where $topic.alias@foo = 'bar';

which will look for all the baseNameString or variant resourceData
equal to 'bar' in the scope 'foo'.

or 

 select $topic, $scope where $topic.alias@$scope = 'cpu';

which will look for all the baseNameString or variant resourceData
equal to 'cpu' in the different scopes and will return also the
scopes. 

Do you find that this feature is needed in TMQL or maybe there is
other way to deal with aliases in Topic Maps?

Thanks,

Rani